]> granicus.if.org Git - graphviz/commitdiff
Experimental: build docker image in GitLab CI
authorMark Hansen <markhansen@google.com>
Sun, 14 Feb 2021 02:03:14 +0000 (13:03 +1100)
committerMark Hansen <markhansen@google.com>
Sun, 14 Feb 2021 03:12:07 +0000 (14:12 +1100)
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.

.gitlab-ci.yml
ci/centos7/Dockerfile

index ed7780fd2ed18d38dfc4192af057ee209f7f88fb..573c17910a27de2cb5d9da0cd94189924c05edba 100644 (file)
@@ -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
index 265a81fa9f2bb82b40ea2b6340c8abd4aee7bbb5..aeeb8ff2c1c64b595272456636c41ba6c09f585e 100644 (file)
@@ -1,3 +1,4 @@
+# Touch the file to force a rebuild
 FROM centos:7
 
 # Development tools