Skip to content

Skip certain jobs for tag pipelines

Mitchell Nielsen requested to merge ci-skip-certain-jobs-for-tags into master

Skips certain jobs for pipeliens running for a tag.

This was inspired by the following pipeline failure: https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator/-/pipelines/301832296

This was a pipeline for a tag, but the pipeline for the related commit was running at the same time. As a result, when the cleanup job for the tag pipeline ran, the cleanup job for the commit pipeline had already finished cleaning up. Therefore, the cleanup job for the tag pipeline failed.

The jobs skipped for tag pipelines aren't needed in that scenario, therefore we avoid jobs that could conflict across tag and branch pipelines, and the tag pipelines complete a bit faster due to having fewer jobs.

Edited by Mitchell Nielsen

Merge request reports