diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 499b238bca526f914a7f9b82381ea3c817903acc..8875166f3c8d77cf71e6128cb99a0b04b6f6d4ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,8 @@ build_containers: --context "${CI_PROJECT_DIR}/${DOCKER_DIR}" \ --dockerfile "${CI_PROJECT_DIR}/${DOCKER_DIR}/Dockerfile" \ --destination "${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CI_COMMIT_REF_SLUG}" \ + --build-arg "CI_AWE_IMAGE_BASE=${CI_AWE_IMAGE_BASE}" \ + --build-arg "CI_AWE_IMAGE_TAG=${CI_COMMIT_REF_SLUG}" \ --cleanup fi done diff --git a/dockerfiles/latex-builder/Dockerfile b/dockerfiles/latex-builder/Dockerfile index 6d0e7bca869eb1bde9066f05e6b590a371498f94..562b523821d3a0432eca0c3fd33b091a7d71c337 100644 --- a/dockerfiles/latex-builder/Dockerfile +++ b/dockerfiles/latex-builder/Dockerfile @@ -1,13 +1,6 @@ -# We use CI_COMMIT_REF_SLUG as a tag here (and not CI_AWE_IMAGE_TAG) -# because the latter refers to what the projects that include the -# CI templates shoud use. That variable usually points to `v5` or similar -# and the associated tag is not always available in the Docker registry -# at the time of building this image. -# CI_COMMIT_REF_SLUG however should be available at build time because -# that's what used in this project's .gitlab-ci.yml. The only time that -# tag is not available is when building this image for a MR pipeline -# where conda-builder is not changed and thus not built. -FROM ${CI_AWE_IMAGE_BASE}/conda-builder:${CI_COMMIT_REF_SLUG} +ARG CI_AWE_IMAGE_BASE +ARG CI_AWE_IMAGE_TAG +FROM ${CI_AWE_IMAGE_BASE}/conda-builder:${CI_AWE_IMAGE_TAG} LABEL version="1.2" LABEL description="Image for building LaTeX documentation through tectonic"