run-status

JFrog Pipelines Documentation

ft:sourceType
Paligo

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.

Usage

Basic:

- task: jfrog/run-status@v0.0.1
  id: pipelines_run
  inputs:
    stepFailureure: true 

Input Variables

Name

Required

Default

Description

stepFailure

false

false

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.

Output Variables

None

Exported Environment Variables

OUT_pipelines_run_status: Use this variable to get the status of the pipeline.

  • OUT_pipelines_run_status is success if all steps are successful

  • OUT_pipelines_run_status is 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 allowFailure: true

License

This project is licensed under Apache 2.0 license.