public abstract class CloudifyBuildStep
extends hudson.tasks.Builder
implements jenkins.tasks.SimpleBuildStep
jenkins.tasks.SimpleBuildStep.LastBuildAction, jenkins.tasks.SimpleBuildStep.LastBuildActionFactory
Constructor and Description |
---|
CloudifyBuildStep() |
Modifier and Type | Method and Description |
---|---|
String |
getCredentialsId() |
String |
getTenant() |
protected boolean |
isCloudifyClientRequired()
By default, a Cloudify step requires a
CloudifyClient instance to
operate. |
void |
perform(hudson.model.Run<?,?> run,
hudson.FilePath workspace,
hudson.Launcher launcher,
hudson.model.TaskListener listener) |
protected abstract void |
performImpl(hudson.model.Run<?,?> run,
hudson.Launcher launcher,
hudson.model.TaskListener listener,
hudson.FilePath workspace,
hudson.EnvVars envVars,
co.cloudify.rest.client.CloudifyClient cloudifyClient)
This should be the main, "real" implementation of
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener) . |
void |
setCredentialsId(String credentialsId) |
void |
setTenant(String tenant) |
String |
toString() |
all, getDescriptor, getRequiredMonitorService, prebuild
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
public String getTenant()
@DataBoundSetter public void setTenant(String tenant)
public String getCredentialsId()
@DataBoundSetter public void setCredentialsId(String credentialsId)
protected boolean isCloudifyClientRequired()
CloudifyClient
instance to
operate. Otherwise, the step should override this method to return
false
.true
If a CloudifyClient
instance should be
prepared and passed to the actual step.protected abstract void performImpl(hudson.model.Run<?,?> run, hudson.Launcher launcher, hudson.model.TaskListener listener, hudson.FilePath workspace, hudson.EnvVars envVars, co.cloudify.rest.client.CloudifyClient cloudifyClient) throws Exception
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener)
. Implementations
need not worry about using the listener, or handle top-level exceptions; this
is done by the wrapper.run
- build object, as given by Jenkinslauncher
- launcher object, as given by Jenkinslistener
- listener object, as given by Jenkinsworkspace
- path to Jenkins workspaceenvVars
- build's environment variablescloudifyClient
- a CloudifyClient
instance pointing at the
Cloudify Manager installation, populated during
configurationException
- May be anything; unified handling is done in
BuildStepCompatibilityLayer.perform(AbstractBuild, Launcher, BuildListener)
public void perform(hudson.model.Run<?,?> run, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener) throws InterruptedException, IOException
perform
in interface jenkins.tasks.SimpleBuildStep
InterruptedException
IOException
Copyright © 2016–2020. All rights reserved.