-
-
Notifications
You must be signed in to change notification settings - Fork 867
Description
Hi there!
JobA and JobB are parallel jobs in the pipeline which get triggered when there is a change in some resource. Other jobs in the pipeline are dependent on previous jobs. I donot want my pipeline to get triggered if any job in pipeline is in-progress. For that I am using pool lock which is working fine except for the parallel jobs. I wanted Job2 to be triggered only when Job1 starts running.
Is there a way to pause the resource check from the pipeline? Fly supports the pause resource similar functionality can we do inside the pipeline.
Below is the sample pipeline.
resources:
-
name: flight-school
type: pool
source:
uri: https://github.com/SaurabhQA/flight-school
branch: master
pool: lock
username:
password: -
name: runOnConcourse
type: git
source:
uri: https://github.com/SaurabhQA/runOnConcourse
branch: master
jobs: -
name: job-A
plan:- get: flight-school
- get: runOnConcourse
trigger: true - put: flight-school
params: {acquire: true} - task: tests
file: flight-school/buildTest.yml
-
name: job-B
plan:- get: flight-school
- get: runOnConcourse
trigger: true - task: tests
file: flight-school/buildTest.yml
-
name: job-C
plan:- get: flight-school
- get: runOnConcourse
passed:- job-A
- job-B
trigger: true
- task: tests
file: flight-school/buildTest.yml
-
name: job-D
plan:- get: flight-school
- get: runOnConcourse
trigger: true
passed: [job-C] - task: sleep
config:
platform: linux
image_resource:
type: docker-image
source: {repository: alpine}
run:
path: sleep
args: ["60"] - put: flight-school
params: {release: flight-school}