public abstract class AbstractStepExecution
extends org.jenkinsci.plugins.workflow.steps.StepExecution
Standard functions used by all steps to ensure standard capabilities.
Constructor and Description |
---|
AbstractStepExecution(org.jenkinsci.plugins.workflow.steps.StepContext context) |
Modifier and Type | Method and Description |
---|---|
void |
doResume()
Subclasses should override this to provide specific logic after a restart operation.
|
void |
doStart()
Subclasses should override this to provide specific logic on step start.
|
void |
doStop()
Subclasses should override this to require specific logic during a stop operation.
|
protected AdobeIOProjectConfig |
getAioProject()
Retrieve the configured Adobe IO Project configured based on the information configured in the Run.
|
protected io.adobe.cloudmanager.CloudManagerApi |
getApi()
Build a Cloud Manager API based on the configured Adobe IO Project.
|
protected CloudManagerBuildAction |
getBuildData()
Get the Cloud Manager Build info from the run.
|
protected org.jenkinsci.plugins.workflow.graph.FlowNode |
getFlowNode()
Helper to get the FlowNode from the context.
|
String |
getId() |
protected Run<?,?> |
getRun()
Helper to get the Run from the context.
|
protected TaskListener |
getTaskListener()
Helper to get the TaskListener from the context.
|
boolean |
isAsync()
Subclasses should override this to indicate if it is an Async step.
|
void |
onResume()
Restart the Execution after a restart.
|
boolean |
start()
Starts the Execution.
|
void |
stop(Throwable cause)
Stop the Execution when an error occurs.
|
protected void |
validateData()
Validate that the data exists for the current run, any missing information will fail the run.
|
public AbstractStepExecution(org.jenkinsci.plugins.workflow.steps.StepContext context)
@Nonnull protected CloudManagerBuildAction getBuildData() throws IOException, InterruptedException
IOException
InterruptedException
@Nonnull protected AdobeIOProjectConfig getAioProject() throws IOException, InterruptedException
IOException
InterruptedException
protected void validateData() throws IOException, InterruptedException
IOException
InterruptedException
@Nonnull protected io.adobe.cloudmanager.CloudManagerApi getApi() throws IOException, InterruptedException
IOException
InterruptedException
@Nonnull protected Run<?,?> getRun() throws IOException, InterruptedException
IOException
InterruptedException
@Nonnull protected TaskListener getTaskListener() throws IOException, InterruptedException
IOException
InterruptedException
@Nonnull protected org.jenkinsci.plugins.workflow.graph.FlowNode getFlowNode() throws IOException, InterruptedException
IOException
InterruptedException
public final boolean start() throws Exception
start
in class org.jenkinsci.plugins.workflow.steps.StepExecution
Exception
public final void onResume()
onResume
in class org.jenkinsci.plugins.workflow.steps.StepExecution
public final void stop(@Nonnull Throwable cause) throws Exception
stop
in class org.jenkinsci.plugins.workflow.steps.StepExecution
Exception
public void doStart() throws Exception
Exception
public void doResume() throws IOException, InterruptedException
IOException
InterruptedException
public void doStop() throws Exception
Exception
public boolean isAsync()
true
Copyright © 2020–2021 Adobe Inc. All rights reserved.