diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-07 09:34:57 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-07 09:34:57 +0300 |
commit | be1c6931da1dbb73c87bdd47219fffae4e51fcc8 (patch) | |
tree | 9f23723b40c6a53ac68faadaa4af2ed089956c5b | |
parent | 8a0d83b496eaff459d55bc6825428f648059e8d9 (diff) |
ci: Stop publishing Docker images for scheduled builds
We've recently grown nightly builds, which allows us to test Gitaly
against Git's master branch without impacting merge requests. But with
this, we now started to publish Docker images for those nightly builds.
While harmless, it's definitely not needed and should thus be avoided.
So let's do so by using the new advanced `only` syntax to exclude
scheduled builds.
-rw-r--r-- | .gitlab-ci.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 058914da5..cd80954eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -178,7 +178,10 @@ docker: - docker build -t $CI_REGISTRY_IMAGE/gitaly:latest --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME - docker push $CI_REGISTRY_IMAGE/gitaly:latest only: - - master@gitlab-org/gitaly + refs: + - master@gitlab-org/gitaly + variables: + - $CI_PIPELINE_SOURCE != "schedule" except: docker-tag: @@ -191,7 +194,10 @@ docker-tag: - docker build -t $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG --build-arg CUSTOM_IMAGE_VERSION=$CUSTOM_IMAGE_VERSION _support/build-images/$CI_JOB_NAME - docker push $CI_REGISTRY_IMAGE/gitaly:$CI_COMMIT_TAG only: - - tags@gitlab-org/gitaly + refs: + - tags@gitlab-org/gitaly + variables: + - $CI_PIPELINE_SOURCE != "schedule" include: - template: Security/License-Scanning.gitlab-ci.yml |