From: Mark Hansen Date: Sun, 14 Feb 2021 02:03:14 +0000 (+1100) Subject: Experimental: build docker image in GitLab CI X-Git-Tag: 2.47.0~87^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86b2d6af0a172d087e9ea8bdc1e87b201a169384;p=graphviz Experimental: build docker image in GitLab CI Starting with just centos7 Following the instructions at https://about.gitlab.com/blog/2019/08/28/building-build-images/. Haven't set up the environment variables yet. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed7780fd2..573c17910 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - build_docker_images - source - build - test @@ -586,3 +587,22 @@ deployment: # do not run this job for MRs, developer’s forks, etc. only: - master@graphviz/graphviz + +build-docker: + image: docker:stable + services: + - docker:dind + stage: build_docker_images + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - cd ci/centos7 + - docker build -t $CI_REGISTRY/graphviz/graphviz:centos7 . + - docker push $CI_REGISTRY/graphviz/graphviz:centos7 + only: + refs: + - master@graphviz/graphviz + changes: + - ci/centos7/Dockerfile + # prevent it re-running on tagged commits + except: + - tags diff --git a/ci/centos7/Dockerfile b/ci/centos7/Dockerfile index 265a81fa9..aeeb8ff2c 100644 --- a/ci/centos7/Dockerfile +++ b/ci/centos7/Dockerfile @@ -1,3 +1,4 @@ +# Touch the file to force a rebuild FROM centos:7 # Development tools