Package com.adobe.aio.cloudmanager
Interface PipelineExecutionApi
-
public interface PipelineExecutionApi
Pipeline Execution APISee the Pipeline Execution API documentation. See the Execution Artifact API documentation. See the Event Definition documentation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
advance(@NotNull PipelineExecution execution)
Advance the execution of the specified pipeline execution, if in an appropriate state.void
advance(@NotNull String programId, @NotNull String pipelineId, @NotNull String executionId)
Advance the execution of the specified pipeline execution, if in an appropriate state.void
cancel(@NotNull PipelineExecution execution)
Cancel the execution of the specified pipeline execution, if in an appropriate state.void
cancel(@NotNull String programId, @NotNull String pipelineId, @NotNull String executionId)
Cancel the execution of the specified pipeline execution, if in an appropriate state.@NotNull PipelineExecution
get(@NotNull Pipeline pipeline, @NotNull String executionId)
Returns the specified execution of the pipeline.@NotNull PipelineExecution
get(@NotNull String programId, @NotNull String pipelineId, @NotNull String executionId)
Get the specified execution of the pipeline.@NotNull String
getArtifactDownloadUrl(@NotNull PipelineExecutionStepState step, String artifactId)
Get the fully qualified URL to the artifact file.@NotNull Optional<PipelineExecution>
getCurrent(@NotNull Pipeline pipeline)
Get the current execution of the specified pipeline, if one exists.@NotNull Optional<PipelineExecution>
getCurrent(@NotNull String programId, @NotNull String pipelineId)
Get the current execution of the specified pipeline, if one exists.@NotNull Collection<Metric>
getQualityGateResults(@NotNull PipelineExecution execution, @NotNull StepAction action)
Get the metrics for the specified execution and step, if any.String
getStepLogDownloadUrl(@NotNull PipelineExecution execution, @NotNull StepAction action)
Get the fully qualified URL to the specified step's log file.String
getStepLogDownloadUrl(@NotNull PipelineExecution execution, @NotNull StepAction action, @NotNull String name)
Get the fully qualified URL to the specified log file referenced by name, within the step.String
getStepLogDownloadUrl(@NotNull String programId, @NotNull String pipelineId, @NotNull String executionId, @NotNull StepAction action)
Get the fully qualified URL to the specified step's log file.String
getStepLogDownloadUrl(@NotNull String programId, @NotNull String pipelineId, @NotNull String executionId, @NotNull StepAction action, @NotNull String name)
Get the fully qualified URL to the specified step's log file.@NotNull PipelineExecutionStepState
getStepState(@NotNull PipelineExecution execution, @NotNull StepAction action)
Get the specified action step for the pipeline execution.@NotNull Collection<PipelineExecution>
list(@NotNull Pipeline pipeline)
List executions of the specified pipeline, using the default limit and starting at 0.@NotNull Collection<PipelineExecution>
list(@NotNull Pipeline pipeline, int limit)
List executions of the specified pipeline, using the specified limit and starting at 0.@NotNull Collection<PipelineExecution>
list(@NotNull Pipeline pipeline, int start, int limit)
List executions of the specified pipeline, using the specified limit and starting at the specified position.@NotNull Collection<PipelineExecution>
list(@NotNull String programId, @NotNull String pipelineId)
List executions of the specified pipeline, using the default limit and starting at 0.@NotNull Collection<PipelineExecution>
list(@NotNull String programId, @NotNull String pipelineId, int limit)
List executions of the specified pipeline, using the specified limit and starting at 0.@NotNull Collection<PipelineExecution>
list(@NotNull String programId, @NotNull String pipelineId, int start, int limit)
List executions of the specified pipeline, using the specified limit and starting at the specified position.@NotNull Collection<Artifact>
listArtifacts(@NotNull PipelineExecutionStepState step)
List all artifacts associated with the specified step.@NotNull PipelineExecutionEvent
parseEvent(@NotNull String eventBody)
Parse the provided string into an Event instance.@NotNull PipelineExecutionEvent
parseEvent(@NotNull String eventBody, @NotNull Map<String,String> requestHeader)
Parse the provided body into an Event instance, validating the event as part of the parsing process.@NotNull PipelineExecution
start(@NotNull Pipeline pipeline)
Start the specified pipeline.@NotNull PipelineExecution
start(@NotNull String programId, @NotNull String pipelineId)
Start the specified pipeline.
-
-
-
Method Detail
-
getCurrent
@NotNull @NotNull Optional<PipelineExecution> getCurrent(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId) throws CloudManagerApiException
Get the current execution of the specified pipeline, if one exists.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the pipeline id of to find the execution- Returns:
- An optional containing the execution details of the pipeline
- Throws:
CloudManagerApiException
- when any error occurs
-
getCurrent
@NotNull @NotNull Optional<PipelineExecution> getCurrent(@NotNull @NotNull Pipeline pipeline) throws CloudManagerApiException
Get the current execution of the specified pipeline, if one exists.- Parameters:
pipeline
- the pipeline reference- Returns:
- An optional containing the execution details of the pipeline
- Throws:
CloudManagerApiException
- when any error occurs
-
start
@NotNull @NotNull PipelineExecution start(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId) throws CloudManagerApiException
Start the specified pipeline.Note: This API call may return before the requested action takes effect. i.e. The Pipelines are scheduled to start once called. However, an immediate subsequent call to
getCurrent(String, String)
may not return a result.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the id of the pipeline- Returns:
- the new execution
- Throws:
CloudManagerApiException
- when any error occurs
-
start
@NotNull @NotNull PipelineExecution start(@NotNull @NotNull Pipeline pipeline) throws PipelineRunningException, CloudManagerApiException
Start the specified pipeline.Note: This API call may return before the requested action takes effect. i.e. The Pipelines are scheduled to start once called. However, an immediate subsequent call to
getCurrent(String, String)
may not return a result.- Parameters:
pipeline
- thePipeline
to start- Returns:
- the new execution
- Throws:
PipelineRunningException
- if the pipeline is already runningCloudManagerApiException
- when any error occurs
-
get
@NotNull @NotNull PipelineExecution get(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, @NotNull @NotNull String executionId) throws CloudManagerApiException
Get the specified execution of the pipeline.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the pipeline idexecutionId
- the id of the execution to retrieve- Returns:
- the execution details
- Throws:
CloudManagerApiException
- when any error occurs
-
get
@NotNull @NotNull PipelineExecution get(@NotNull @NotNull Pipeline pipeline, @NotNull @NotNull String executionId) throws CloudManagerApiException
Returns the specified execution of the pipeline.- Parameters:
pipeline
- the pipeline context for the executionexecutionId
- the id of the execution to retrieve- Returns:
- the execution details
- Throws:
CloudManagerApiException
- when any error occurs
-
getStepState
@NotNull @NotNull PipelineExecutionStepState getStepState(@NotNull @NotNull PipelineExecution execution, @NotNull @NotNull StepAction action) throws CloudManagerApiException
Get the specified action step for the pipeline execution.- Parameters:
execution
- the execution contextaction
- the step state action (seeStepAction
)- Returns:
- the step state details
- Throws:
CloudManagerApiException
- when any error occurs
-
advance
void advance(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, @NotNull @NotNull String executionId) throws CloudManagerApiException
Advance the execution of the specified pipeline execution, if in an appropriate state.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the id of the pipeline to cancelexecutionId
- the execution id to be advanced- Throws:
CloudManagerApiException
- when any error occurs
-
advance
void advance(@NotNull @NotNull PipelineExecution execution) throws CloudManagerApiException
Advance the execution of the specified pipeline execution, if in an appropriate state.- Parameters:
execution
- the execution to be advanced- Throws:
CloudManagerApiException
- when any error occurs
-
cancel
void cancel(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, @NotNull @NotNull String executionId) throws CloudManagerApiException
Cancel the execution of the specified pipeline execution, if in an appropriate state.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the id of the pipeline to cancelexecutionId
- the execution id to be canceled- Throws:
CloudManagerApiException
- when any error occurs
-
cancel
void cancel(@NotNull @NotNull PipelineExecution execution) throws CloudManagerApiException
Cancel the execution of the specified pipeline execution, if in an appropriate state.- Parameters:
execution
- the execution to be canceled- Throws:
CloudManagerApiException
- when any error occurs
-
getStepLogDownloadUrl
String getStepLogDownloadUrl(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, @NotNull @NotNull String executionId, @NotNull @NotNull StepAction action) throws CloudManagerApiException
Get the fully qualified URL to the specified step's log file.- Parameters:
programId
- the program id of the pipeline contextpipelineId
- the pipeline id for the execution contextexecutionId
- the execution idaction
- the execution step action for the log- Returns:
- the log file URL
- Throws:
CloudManagerApiException
- when any error occurs
-
getStepLogDownloadUrl
String getStepLogDownloadUrl(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, @NotNull @NotNull String executionId, @NotNull @NotNull StepAction action, @NotNull @NotNull String name) throws CloudManagerApiException
Get the fully qualified URL to the specified step's log file.- Parameters:
programId
- the program id of the pipeline contextpipelineId
- the pipeline id for the execution contextexecutionId
- the execution idaction
- the execution step action contextname
- custom log file name- Returns:
- the log file URL
- Throws:
CloudManagerApiException
- when any error occurs
-
getStepLogDownloadUrl
String getStepLogDownloadUrl(@NotNull @NotNull PipelineExecution execution, @NotNull @NotNull StepAction action) throws CloudManagerApiException
Get the fully qualified URL to the specified step's log file.- Parameters:
execution
- the execution contextaction
- the execution step action context- Returns:
- the log file download URL
- Throws:
CloudManagerApiException
- when any error occurs
-
getStepLogDownloadUrl
String getStepLogDownloadUrl(@NotNull @NotNull PipelineExecution execution, @NotNull @NotNull StepAction action, @NotNull @NotNull String name) throws CloudManagerApiException
Get the fully qualified URL to the specified log file referenced by name, within the step.- Parameters:
execution
- the execution contextaction
- the execution step action contextname
- custom log file name- Returns:
- the log file download URL
- Throws:
CloudManagerApiException
- when any error occurs
-
getQualityGateResults
@NotNull @NotNull Collection<Metric> getQualityGateResults(@NotNull @NotNull PipelineExecution execution, @NotNull @NotNull StepAction action) throws CloudManagerApiException
Get the metrics for the specified execution and step, if any.- Parameters:
execution
- the execution contextaction
- the action step context- Returns:
- the metrics for the execution
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId) throws CloudManagerApiException
List executions of the specified pipeline, using the default limit and starting at 0.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the pipeline id- Returns:
- list of executions
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull Pipeline pipeline) throws CloudManagerApiException
List executions of the specified pipeline, using the default limit and starting at 0.- Parameters:
pipeline
- the pipeline context- Returns:
- list of executions
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, int limit) throws CloudManagerApiException
List executions of the specified pipeline, using the specified limit and starting at 0.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the pipeline idlimit
- the number of executions to return- Returns:
- list of executions
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull Pipeline pipeline, int limit) throws CloudManagerApiException
List executions of the specified pipeline, using the specified limit and starting at 0.- Parameters:
pipeline
- the pipeline contextlimit
- the number of executions to return- Returns:
- list of executions, if any
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull String programId, @NotNull @NotNull String pipelineId, int start, int limit) throws CloudManagerApiException
List executions of the specified pipeline, using the specified limit and starting at the specified position.- Parameters:
programId
- the program id context of the pipelinepipelineId
- the pipeline idstart
- the starting position of the resultslimit
- the number of executions to return- Returns:
- list of executions
- Throws:
CloudManagerApiException
- when any error occurs
-
list
@NotNull @NotNull Collection<PipelineExecution> list(@NotNull @NotNull Pipeline pipeline, int start, int limit) throws CloudManagerApiException
List executions of the specified pipeline, using the specified limit and starting at the specified position.- Parameters:
pipeline
- the pipeline contextstart
- the starting position of the resultslimit
- the number of executions to return- Returns:
- list of executions
- Throws:
CloudManagerApiException
- when any error occurs
-
listArtifacts
@NotNull @NotNull Collection<Artifact> listArtifacts(@NotNull @NotNull PipelineExecutionStepState step) throws CloudManagerApiException
List all artifacts associated with the specified step.- Parameters:
step
- the pipeline execution step context- Returns:
- list of artifacts
- Throws:
CloudManagerApiException
- when any error occurs
-
getArtifactDownloadUrl
@NotNull @NotNull String getArtifactDownloadUrl(@NotNull @NotNull PipelineExecutionStepState step, String artifactId) throws CloudManagerApiException
Get the fully qualified URL to the artifact file.- Parameters:
step
- the pipeline execution step contextartifactId
- the id of the artifact- Returns:
- the artifact file download url
- Throws:
CloudManagerApiException
- when any error occurs
-
parseEvent
@NotNull @NotNull PipelineExecutionEvent parseEvent(@NotNull @NotNull String eventBody) throws CloudManagerApiException
Parse the provided string into an Event instance. Use this API when polling the journal events.- Parameters:
eventBody
- the body to parse into the event- Returns:
- an instance of a
PipelineExecutionEvent
- Throws:
CloudManagerApiException
- when any error occurs
-
parseEvent
@NotNull @NotNull PipelineExecutionEvent parseEvent(@NotNull @NotNull String eventBody, @NotNull @NotNull Map<String,String> requestHeader) throws CloudManagerApiException
Parse the provided body into an Event instance, validating the event as part of the parsing process. Use this API when receiving webhook events.- Parameters:
eventBody
- the body to parse into the eventrequestHeader
- the request headers sent with the Event- Returns:
- an instance of a
PipelineExecutionEvent
- Throws:
CloudManagerApiException
- when any error occurs
-
-