diff options
| author | Pierre-Marie Pédrot | 2019-11-07 16:25:15 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-11-12 11:33:19 +0100 |
| commit | ca272c067ba6fe68b5d2958888b8e7d6b1eb2d18 (patch) | |
| tree | 82c37acf126b6078449bc84dc64b7922bbf18ba2 /dev | |
| parent | 50c64231f2d4b92f2ab296da495cb54bc51e4b1c (diff) | |
Expand documentation about generating a Docker image.
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/ci/docker/README.md | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/dev/ci/docker/README.md b/dev/ci/docker/README.md index 919e2a735f..16c4ac37d9 100644 --- a/dev/ci/docker/README.md +++ b/dev/ci/docker/README.md @@ -4,10 +4,33 @@ This directory provides Docker images to be used by Coq's CI. The images do support Docker autobuild on `hub.docker.com` and Gitlab's private registry. -Gitlab CI will build and tag a Docker by default for every job if the -`SKIP_DOCKER` variable is not set to `false`. In Coq's CI, this -variable is usually set to `false` indeed to avoid booting a useless -job. +The Gitlab CI will build a docker image unless the CI environment variable +`SKIP_DOCKER` is set to `true`. This image will be +stored in the [Gitlab container registry](https://gitlab.com/coq/coq/container_registry) +under the name given by the `CACHEKEY` variable from +the [Gitlab CI configuration file](../../../.gitlab-ci.yml). + +In Coq's default CI, `SKIP_DOCKER` is set so as to avoid running a lengthy redundant job. + +It can be used to regenerate a fresh Docker image on Gitlab through the following steps. +- Change the `CACHEKEY` variable to a fresh name in the CI configuration in a new commit. +- Push this commit to a Github PR. This will trigger a Gitlab CI run that will + immediately fail, as the Docker image is missing and the `SKIP_DOCKER` + default value prevents rebuilding the image. +- Run a new pipeline on Gitlab with that PR branch, using the green "Run pipeline" + button on the [web interface](https://gitlab.com/coq/coq/pipelines), + with the `SKIP_DOCKER` environment variable set to `false`. This will run a `docker-boot` process, and + once completed, a new Docker image will be available in the container registry, + with the name set in `CACHEKEY`. +- Any pipeline with the same `CACHEKEY` will now automatically reuse that + image without rebuilding it from scratch. + +For documentation purposes, we also require keeping in sync the `CACHEKEY` comment +from the first line of the [Dockerfile](bionic_coq/Dockerfile) in the same +commit. + +In case you do not have the rights to run Gitlab CI pipelines, you should ask +the ci-maintainers Github team to do it for you. ## Manual Building |
