From: Jordan Petridis Date: Tue, 7 Jul 2020 16:25:19 +0000 (+0300) Subject: citemplate: make it so docker builds only run for detached pipelines X-Git-Tag: 1.19.3~497^2~102 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c44f415a4bf1f0253aff461ea2bb3e143c94c5e1;p=platform%2Fupstream%2Fgstreamer.git citemplate: make it so docker builds only run for detached pipelines Currently, if you have a MR open, there 2 pipelines being triggered. One normal, and one detached. Previously, if you were to rebuild an image, the jobs of the docker build stage would be executed concurrently, race and end up both rebuilding the image. Make them manual for normal pipelines to avoid such occurrence and waste of resources. Part-of: --- diff --git a/gitlab/ci_template.yml b/gitlab/ci_template.yml index cffaec6..7255cbc 100644 --- a/gitlab/ci_template.yml +++ b/gitlab/ci_template.yml @@ -195,7 +195,14 @@ default: .base: image: "$CI_REGISTRY/freedesktop/ci-templates/buildah:2020-03-24" rules: - - when: 'always' + # Always run for detached pipeleines + - if: '$CI_MERGE_REQUEST_ID' + when: 'always' + - if: '$CI_COMMIT_BRANCH == "master"' + when: 'always' + - if: '$CI_COMMIT_BRANCH == "$GST_UPS_BRANCH"' + when: 'always' + - when: 'manual' variables: STORAGE_DRIVER: 'vfs' BUILDAH_FORMAT: 'docker'