ci: Avoid fetching tags for build jobs
authorJordan Petridis <jordan@centricular.com>
Tue, 30 Nov 2021 14:45:07 +0000 (16:45 +0200)
committerJordan Petridis <jordan@centricular.com>
Tue, 30 Nov 2021 15:01:52 +0000 (17:01 +0200)
Avoid fetching tags since we don't need them for builds.
Only caveat might be what happens when a pipeline from
a tag is triggered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1400>

.gitlab-ci.yml

index 411ba7a..dc5791d 100644 (file)
@@ -88,10 +88,14 @@ workflow:
   # https://docs.gitlab.com/ee/ci/yaml/index.html#switch-between-branch-pipelines-and-merge-request-pipelines
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+      variables:
+        GIT_FETCH_EXTRA_FLAGS: '--no-tags'
     - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
       when: never
     - if: '$CI_COMMIT_TAG'
     - if: '$CI_COMMIT_BRANCH'
+      variables:
+        GIT_FETCH_EXTRA_FLAGS: '--no-tags'
 
 #
 # Global CI policy