public class MarathonBuilderImpl extends MarathonBuilder
| Constructor and Description |
|---|
MarathonBuilderImpl() |
MarathonBuilderImpl(AppConfig config) |
| Modifier and Type | Method and Description |
|---|---|
MarathonBuilder |
build()
Compose the builder.
|
String |
getAppid() |
String |
getDocker() |
boolean |
getDockerForcePull() |
net.sf.json.JSONObject |
getJson() |
List<MarathonLabel> |
getLabels() |
List<MarathonUri> |
getUris() |
MarathonBuilder |
read()
Read in default file (marathon.json) as JSON.
|
MarathonBuilder |
read(String filename)
Read in filename as JSON.
|
MarathonBuilder |
setConfig(AppConfig config)
Set the Application Configuration to config.
|
MarathonBuilder |
setEnvVars(hudson.EnvVars vars)
Set the Jenkins Environment Variables to vars.
|
MarathonBuilder |
setJson(net.sf.json.JSONObject json)
Set the JSON for this builder to json.
|
MarathonBuilder |
setWorkspace(hudson.FilePath ws)
Set the Jenkins workspace to ws.
|
MarathonBuilder |
toFile()
Write the JSON that will be sent to the target Marathon instance to the default file
(marathon-rendered-${BUILD_NUMBER}.json).
|
MarathonBuilder |
toFile(String filename)
Write the JSON that will be sent to the target Marathon instance to filename.
|
MarathonBuilder |
update()
Perform the actual update call to Marathon.
|
getApp, getBuilder, getURL, setAppFromJson, setURLpublic MarathonBuilderImpl()
public MarathonBuilderImpl(AppConfig config)
public List<MarathonUri> getUris()
public List<MarathonLabel> getLabels()
public String getAppid()
public String getDocker()
public boolean getDockerForcePull()
public MarathonBuilder update() throws mesosphere.marathon.client.MarathonException, AuthenticationException
update in class MarathonBuildermesosphere.marathon.client.MarathonException - If Marathon does not return a 20x OK responseAuthenticationException - If an authentication provider was used and encountered a problem.public MarathonBuilder read(String filename) throws IOException, InterruptedException, MarathonFileMissingException, MarathonFileInvalidException
MarathonBuilderread in class MarathonBuilderfilename - Path to the JSON fileIOException - on IO issuesInterruptedException - on complications reading fileMarathonFileMissingException - when the Marathon config file is missingMarathonFileInvalidException - when the Marathon config is not a filepublic MarathonBuilder read() throws IOException, InterruptedException, MarathonFileMissingException, MarathonFileInvalidException
MarathonBuilderread in class MarathonBuilderIOException - on IO issuesInterruptedException - on complications reading fileMarathonFileMissingException - when the Marathon config file is missingMarathonFileInvalidException - when the Marathon config is not a fileMarathonBuilder.read(String)public net.sf.json.JSONObject getJson()
getJson in class MarathonBuilderpublic MarathonBuilder setJson(net.sf.json.JSONObject json)
MarathonBuilderMarathonBuilder.read(String).setJson in class MarathonBuilderjson - The JSON value to use for this builderpublic MarathonBuilder setEnvVars(hudson.EnvVars vars)
MarathonBuildersetEnvVars in class MarathonBuildervars - Jenkins environment variablespublic MarathonBuilder setConfig(AppConfig config)
MarathonBuildersetConfig in class MarathonBuilderconfig - application configurationpublic MarathonBuilder setWorkspace(hudson.FilePath ws)
MarathonBuildersetWorkspace in class MarathonBuilderws - Jenkins workspacepublic MarathonBuilder build()
MarathonBuilderbuild in class MarathonBuilderMarathonClientpublic MarathonBuilder toFile(String filename) throws InterruptedException, IOException, MarathonFileInvalidException
MarathonBuildertoFile in class MarathonBuilderfilename - File to write rendered JSONInterruptedException - when issues encountered with filesystemIOException - on IO issuesMarathonFileInvalidException - when Marathon config file is not a filepublic MarathonBuilder toFile() throws InterruptedException, IOException, MarathonFileInvalidException
MarathonBuildertoFile in class MarathonBuilderInterruptedException - when issues encountered with filesystemIOException - on IO issuesMarathonFileInvalidException - when Marathon config file is not a fileMarathonBuilder.toFile(String)Copyright © 2016–2017. All rights reserved.