summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>2018-06-18 09:34:10 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2018-07-03 10:22:12 +1000
commitb76171ca449acefa39f9cdb9e11dbd93600ae2a4 (patch)
tree3429eb8d7f57bc6d6ba270c29840bb38a95e55b7
parent9cc446aed763b853755727c062d90d58a98570be (diff)
CI: speed up the docker_check stage
There is no point in login in to the registry if there is no need to create a new docker image. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> (cherry picked from commit b2b7fab7b18128e7fa8cc71f0ab42c49d988151a)
-rw-r--r--.gitlab-ci.yml8
1 files changed, 4 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8a23da67..80c2f4f6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -179,12 +179,12 @@ ubuntu:18.04@docker-check:
stage: docker_prep
services:
- docker:dind
- before_script:
- - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+
# create a Dockerfile with our dependencies
- echo "FROM fedora:$FEDORA_VERSION" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile
@@ -221,12 +221,12 @@ fedora:27@docker-prep:
stage: docker_prep
services:
- docker:dind
- before_script:
- - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
+ - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+
# create a Dockerfile with our dependencies
- echo "FROM ubuntu:$UBUNTU_VERSION" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile