Search code examples
devopsconcourseconcourse-pipelineconcourse-fly

Don't run second job when first job fails in concourse


I am new to concourse and created one concourse pipeline having 2 jobs that are running sequential.

Is there a way to not run second job when first job fails?

I know that i can handle this at task level, but can i handle this at job level?


Solution

  • This can be done with the passed attribute of the get step in the job definition. But, that requires a common resource to be used in the get step.

    jobs:
      - name: job0 
        plan:
          - get: resource0
          - task: ...
      - name: job1
        plan:
          - get: resource0
            passed: [job0]
          - task: ...