We have several projects in our self-managed GitLab (13.6.3-ee) that all contribute toward our product, and I’m trying to create a pipeline that will avoid duplicate builds and deploys when changes are pushed to several projects within the same time frame. Each project’s gitlab-ci.yaml file triggers a pipeline in a single project that has an action similar to the following:
checkwait: interruptible: true script: - echo "Part 1" postwait: interruptible: true rules: - when: on_success when: delayed start_in: 5 minutes variables: GIT_STRATEGY: none script: - echo "Job started"
My expectation was that the first time the pipeline was triggered, it would execute the “checkwait” job and then delay the “postwait” job for the specified 5 minutes. Because Auto-cancel redundant, pending pipelines is true, subsequent times the pipeline is triggered, I expected either the first job would be cancelled or the second one would when it was created.
The way it actually behaves is to execute the “checkwait” job and put the “postwait” job into delayed status in both cases.
Am I misunderstanding how this is supposed to work? Is there another way I can get the results I’m looking for? Any help would be appreciated.