mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Follow GitLab CI best practices
This commit changes few things, implementing some of the GitLab CI known
best practices:
1. Explicitly pointing the `docker:git` image to a specific version.
Leaving the floating one we're risking that a buggy release of new
Docker image will be randomly introduced to our pipelines. It's also
best to make the Docker Client (used by the job from within the
`docker:git` image) to be at the same version as the Docker Engine
(running in the `docker:dind` service container).
2. Replacing `ci-job-token` with `CI_REGISTRY_USER` and `CI_JOB_TOKEN`
with `CI_REGISTRY_PASSWORD` makes the script more bulletproff. Yes,
at this moment these variables contain the same values. But they are
dedicated for such usage and if GitLab CI will ever decide to switch
how Registry access should be done, the dedicated variables will
folow the proper way.
This commit is contained in:
parent
9ce844b7f4
commit
026e9fa6ef
1 changed files with 2 additions and 2 deletions
|
|
@ -3,11 +3,11 @@ include:
|
|||
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
|
||||
|
||||
default:
|
||||
image: docker:git
|
||||
image: docker:20.10.3-git
|
||||
services:
|
||||
- docker:20.10.3-dind
|
||||
before_script:
|
||||
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||
- source scripts/build-helpers.sh
|
||||
- apk add -U bash
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue