mirror of
https://github.com/sameersbn/docker-gitlab.git
synced 2025-12-08 17:36:24 +00:00
Prefer CI_REGISTRY_PASSWORD over CI_REGISTRY_PASS
This commit is contained in:
parent
1f048d144e
commit
ad8b54bdb9
@ -7,7 +7,7 @@ before_script:
|
||||
- export VERSION=$(cat VERSION)
|
||||
- export CI_REGISTRY=${CI_REGISTRY:-hub.docker.com}
|
||||
- export CI_REGISTRY_USER=${CI_REGISTRY_USER:-gitlab-ci-token}
|
||||
- export CI_REGISTRY_PASS=${CI_REGISTRY_PASS:-${CI_JOB_TOKEN}}
|
||||
- export CI_REGISTRY_PASSWORD=${CI_REGISTRY_PASS:-${CI_REGISTRY_PASSWORD:-${CI_JOB_TOKEN}}}
|
||||
- export DOCKER_IMAGE=${DOCKER_IMAGE:-${CI_REGISTRY}/${CI_PROJECT_PATH}}
|
||||
- |
|
||||
if [ "${DOCKER_IMAGE}" = "/" ]; then
|
||||
@ -19,7 +19,7 @@ docker:build:
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASS} ${CI_REGISTRY}
|
||||
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
|
||||
- docker build
|
||||
--pull
|
||||
--cache-from=${DOCKER_IMAGE}
|
||||
|
||||
@ -4,9 +4,10 @@ When using your own gitlab instance, the provided .gitlab-ci.yml will be automat
|
||||
|
||||
Overrides for these values can be set within the project, under `Settings` -> `CI/CD` -> `Variables`.
|
||||
|
||||
| Variable | Default Value | Description |
|
||||
| ------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `CI_REGISTRY` | `hub.docker.com` | If available this will be automatically overriden by registry address which is configured within the GitLab instance |
|
||||
| `CI_REGISTRY_USER` | `gitlab-ci-token` | Username for the registry |
|
||||
| `CI_REGISTRY_PASS` | `${CI_JOB_TOKEN}` | Password for the registry |
|
||||
| `DOCKER_IMAGE` | `sameersbn/gitlab` | Docker image name, will be automatically be overriden by the running GitLab instance with the `${CI_PROJECT_PATH}` variable. This will case the image to be uploaded to the local registry of the project within GitLab. |
|
||||
| Variable | Default Value | Description |
|
||||
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `CI_REGISTRY` | `hub.docker.com` | If available this will be automatically overriden by registry address which is configured within the GitLab instance |
|
||||
| `CI_REGISTRY_USER` | `gitlab-ci-token` | Username for the registry |
|
||||
| `CI_REGISTRY_PASSWORD` | `${CI_JOB_TOKEN}` | Password for the registry |
|
||||
| `CI_REGISTRY_PASS` | `${CI_JOB_TOKEN}` | DEPRECATED: Use `CI_REGISTRY_PASSWORD` |
|
||||
| `DOCKER_IMAGE` | `sameersbn/gitlab` | Docker image name, will be automatically be overriden by the running GitLab instance with the `${CI_PROJECT_PATH}` variable. This will case the image to be uploaded to the local registry of the project within GitLab. |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user