aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml25
1 files changed, 13 insertions, 12 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 62b3eb6..7b7ae64 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,15 @@
# Design:
-# - build stage (e.g. docker build -t mathcomp-dev:$IID_$SLUG_coq-8.7 .)
+# - build stage (e.g. docker build -t mathcomp-dev:$IID_$SLUG_coq-8.12 .)
# - all branches (not tags) => push on GitLab registry
# - GitHub PRs => push on GitLab and report back thanks to @coqbot
# - test stage (image: mathcomp-dev:$IID_$SLUG_coq-8.7)
# - script template foreach project (custom CONTRIB_URL, script)
# - jobs foreach project and Coq version (custom COQ_VERSION, CONTRIB_VERSION)
-# - deploy stage (only branch "master" and environment "deployment")
+# - deploy stage (only branch "master" and environment deployments "mathcomp/*")
# - pull each built image from GitLab registry => push to Docker Hub
# + scheduled build & deploy for mathcomp/mathcomp-dev:coq-dev
#
-# Config for protected environment "deployment":
+# Config for protected environment deployments "mathcomp/*":
# - set vars HUB_REGISTRY, HUB_REGISTRY_USER, HUB_REGISTRY_IMAGE, HUB_TOKEN
#
# Remark:
@@ -472,14 +472,15 @@ ci-fcsl-pcm-dev:
services:
- docker:dind
environment:
- name: deployment
+ # here, CI_JOB_NAME must not contain any ':', hence the use of '_'
+ name: "mathcomp/${CI_JOB_NAME}"
url: https://hub.docker.com/r/mathcomp/mathcomp-dev
variables:
GIT_STRATEGY: none
- HUB_IMAGE: "mathcomp/${CI_JOB_NAME}"
IMAGE_PREFIX: "${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}_${CI_COMMIT_REF_SLUG}"
script:
- - export IMAGE="${IMAGE_PREFIX}_${CI_JOB_NAME##*:}"
+ - export IMAGE="${IMAGE_PREFIX}_${CI_JOB_NAME##*_}"
+ - export HUB_IMAGE="mathcomp/${CI_JOB_NAME/_/:}"
- echo "${IMAGE}"
- docker pull "${IMAGE}"
- echo "${HUB_IMAGE}"
@@ -501,22 +502,22 @@ ci-fcsl-pcm-dev:
variables:
- $CRON_MODE == "nightly"
-mathcomp-dev:coq-8.9:
+mathcomp-dev_coq-8.9:
extends: .docker-deploy-once
-mathcomp-dev:coq-8.10:
+mathcomp-dev_coq-8.10:
extends: .docker-deploy-once
-mathcomp-dev:coq-8.11:
+mathcomp-dev_coq-8.11:
extends: .docker-deploy-once
-mathcomp-dev:coq-8.12:
+mathcomp-dev_coq-8.12:
extends: .docker-deploy-once
# to uncomment when 8.13+alpha available
-# mathcomp-dev:coq-8.13:
+# mathcomp-dev_coq-8.13:
# # to be replaced with .docker-deploy-once when 8.13.0 available
# extends: .docker-deploy
-mathcomp-dev:coq-dev:
+mathcomp-dev_coq-dev:
extends: .docker-deploy