You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is there a way to prevent parallel jobs from getting triggered if they are dependent on the same resource #2071
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.
@shashwathi Thanks for the reply. I tried the below scenario. Job-A and Job-B are parallel jobs. Job-C and Job-D are executed when the previous job passed. I saw that when Job-C was is progress A and B was not triggered however once Job-C completed again Job-A and Job-B was triggered. I expected Job-D to be triggered after Job-C completed. Attached is the pipeline file.Could you please suggest how to serialize my pipeline. How can I prevent triggering of pipeline when previous Jobs are expected to run? serialTrigger.txt
I saw that when Job-C was is progress A and B was not triggered however once Job-C completed again Job-A and Job-B was triggered
It is possible that Job A and Job B are triggered because of new commit to flight-school resource. Job A and Job B have trigger: true set only on that resource.
I expected Job-D to be triggered after Job-C completed.
If there is a new commit on flight school which has passed Job C then Job D will be triggered. It is possible that the following sequence of events might have occured
Job A and Job B pass with commit 1234
Job C is triggered with flight school resource 1234
New commit is made to flight school with commit sha 1235
Job A and Job B is queued up(not running cuz of serial group)
Job A and Job B get triggered before Job D.
How can I prevent triggering of pipeline when previous Jobs are expected to run?
Consider merging Job C and Job D and use on-success to trigger task of Job D. Looks like you really want Job D to be triggered after C so merge them into one job definition and have 2nd task trigger only if previous one succeeds.
Activity
shashwathi commentedon Mar 19, 2018
@SaurabhQA : Have you considered using
serial_groups?SaurabhQA commentedon Mar 27, 2018
@shashwathi Thanks for the reply. I tried the below scenario. Job-A and Job-B are parallel jobs. Job-C and Job-D are executed when the previous job passed. I saw that when Job-C was is progress A and B was not triggered however once Job-C completed again Job-A and Job-B was triggered. I expected Job-D to be triggered after Job-C completed. Attached is the pipeline file.Could you please suggest how to serialize my pipeline. How can I prevent triggering of pipeline when previous Jobs are expected to run?
serialTrigger.txt
Job-A
serial_groups: [serial-group-1]
job-B
serial_groups: [serial-group-2]
Job-C
serial_groups: [serial-group-1,serial-group-2]
Job-D
serial_groups: [serial-group-1,serial-group-2]
shashwathi commentedon Mar 28, 2018
It is possible that Job A and Job B are triggered because of new commit to
flight-schoolresource. Job A and Job B havetrigger: trueset only on that resource.If there is a new commit on flight school which has passed
Job CthenJob Dwill be triggered. It is possible that the following sequence of events might have occuredConsider merging Job C and Job D and use
on-successto trigger task of Job D. Looks like you really want Job D to be triggered after C so merge them into one job definition and have 2nd task trigger only if previous one succeeds.Hope this helps
SaurabhQA commentedon Mar 29, 2018
Thanks! It works 👍
bump etree tsa handlers mux clockwork goxmldsig genproto grpc