From fe911e63f2a1217bf2ef5e6e8e0e4231b75713dc Mon Sep 17 00:00:00 2001 From: Mark Hansen Date: Sat, 20 Feb 2021 18:07:12 +1100 Subject: [PATCH] Don't checkout the source code for docker push It's not used and not needed. This might speed up the CI a little. Based off https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ --- .gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index acb304efe..235889780 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -631,6 +631,10 @@ deployment: .docker_push_template: &docker_push_definition <<: *docker_definition stage: push_docker_images + variables: + # Docker pull and push doesn't need GitLab to clone the source code. + # Skipping code checkout should speed up execution a little. + GIT_STRATEGY: none only: refs: # Only master should be pushed to :latest, not unmerged merge-requests. -- 2.40.0