Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Read <eread@gitlab.com>2022-10-21 14:53:16 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2022-10-21 14:53:16 +0300
commit138c95ff982d0e5dae60a0eef1eb52361c514b59 (patch)
tree1383ee6622a30c45a438b6d687b539774b3ccc92 /.gitlab
parent7a4ec3e64a89964b4cc9df91ad831e7a7f8dd090 (diff)
Use versioned base image for latest.Dockerfile and add test
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/docker-images.gitlab-ci.yml37
1 files changed, 37 insertions, 0 deletions
diff --git a/.gitlab/ci/docker-images.gitlab-ci.yml b/.gitlab/ci/docker-images.gitlab-ci.yml
index 68066286f..536abeb94 100644
--- a/.gitlab/ci/docker-images.gitlab-ci.yml
+++ b/.gitlab/ci/docker-images.gitlab-ci.yml
@@ -200,6 +200,24 @@ image:nginx-onbuild:
name: registry/nginx-onbuild
#
+# Test the nginx-onbuild Docker image if changes made to its Dockerfile
+#
+test:image:nginx-onbuild:
+ extends:
+ - .docker_prepare
+ stage: test
+ variables:
+ IMAGE_NAME: $CI_REGISTRY_IMAGE:nginx-onbuild
+ DOCKERFILE: dockerfiles/nginx.onbuild.Dockerfile
+ needs: []
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ changes:
+ - $DOCKERFILE
+ script:
+ - docker build -t $IMAGE_NAME -f $DOCKERFILE .
+
+#
# Final Docker image containing a single version
# It is based on single.Dockerfile for each branch
#
@@ -261,3 +279,22 @@ image:docs-latest:
script:
- docker build --build-arg NANOC_ENV=${NANOC_ENV} --build-arg CI_COMMIT_REF_NAME=${CI_COMMIT_REF_NAME} -t $IMAGE_NAME -f $DOCKERFILE .
- docker push $IMAGE_NAME
+
+#
+# Test the GitLab docs latest Docker image if changes made to its Dockerfile
+#
+test:image:docs-latest:
+ extends:
+ - .docker_prepare
+ stage: test
+ variables:
+ IMAGE_NAME: $CI_REGISTRY_IMAGE:latest
+ DOCKERFILE: latest.Dockerfile
+ needs: []
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "merge_request_event"
+ changes:
+ - $DOCKERFILE
+ script:
+ - docker build -t $IMAGE_NAME -f $DOCKERFILE .
+ - docker run --rm $IMAGE_NAME ls -l /usr/share/nginx/html