This Pipelines Task collects all steps in a pipeline and reads the status to determine if it was a successful run. Ideally to be used in postRun step to find out run status and take action. Useful for sending notifications or sending events based on status.
- task: firstname.lastname@example.org id: pipelines_run inputs: stepFailureure: true
If set to true, the task returns non-zero exit code, forcing it to go to onFailure section if defined. In addition, the step is marked as failed.
Exported Environment Variables
OUT_pipelines_run_status: Use this variable to get the status of the pipeline.
OUT_pipelines_run_statusis success if all steps are successful
OUT_pipelines_run_statusis failure if at least one of the step fails
How does it work?
Based on runID, fetches steps and step json iterates over all steps to determine the result of the run.
Skips current step status or step with status code 4001
Skips steps with configuration
This project is licensed under Apache 2.0 license.