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-06-06 01:39:04 +0300
committerEvan Read <eread@gitlab.com>2022-06-06 01:45:29 +0300
commit66f041c98630dc1e3e504b963a35747ac70381ab (patch)
treec864f28f17883f9a7a16e93381556bc39c7416ee /.gitlab-ci.yml
parent03faf2938dccea5472c3eea4467f0e15ef662eaa (diff)
Improve tagging of base image
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml22
1 files changed, 17 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 573c2c68..33899b98 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -662,16 +662,23 @@ test:image:docs-lint-html:
#
# Build and deploy the GitLab Docs base Docker image
#
-image:gitlab-docs-base:
+build-deploy:image:gitlab-docs-base:
extends:
- - .rules_scheduled_manual
- .docker_prepare
stage: build-images
variables:
- IMAGE_NAME: $CI_REGISTRY_IMAGE:base
+ IMAGE_NAME: $CI_REGISTRY_IMAGE/base:alpine-$ALPINE_VERSION-ruby-$RUBY_VERSION-$CI_COMMIT_SHORT_SHA
DOCKERFILE: dockerfiles/gitlab-docs-base.Dockerfile
+ rules:
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ changes:
+ - $DOCKERFILE
script:
- - docker build -t $IMAGE_NAME -f $DOCKERFILE .
+ - docker build
+ --build-arg ALPINE_VERSION=${ALPINE_VERSION}
+ --build-arg RUBY_VERSION=${RUBY_VERSION}
+ --tag $IMAGE_NAME
+ --file $DOCKERFILE .
- docker push $IMAGE_NAME
environment:
name: registry/docs-base
@@ -685,13 +692,18 @@ test:image:gitlab-docs-base:
stage: test
needs: []
variables:
+ IMAGE_NAME: $CI_REGISTRY_IMAGE/base:alpine-$ALPINE_VERSION-ruby-$RUBY_VERSION-$CI_COMMIT_SHORT_SHA
DOCKERFILE: dockerfiles/gitlab-docs-base.Dockerfile
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- $DOCKERFILE
script:
- - docker build --file $DOCKERFILE .
+ - docker build
+ --build-arg ALPINE_VERSION=${ALPINE_VERSION}
+ --build-arg RUBY_VERSION=${RUBY_VERSION}
+ --tag $IMAGE_NAME
+ --file $DOCKERFILE .
#
# Helper Docker image containing all build dependencies.