diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3e190bd..5e7b1798 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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_PASSWORD=${CI_REGISTRY_PASS:-${CI_REGISTRY_PASSWORD:-${CI_JOB_TOKEN}}} + - export CI_REGISTRY_PASSWORD=${CI_REGISTRY_PASSWORD:-${CI_JOB_TOKEN}} - export DOCKER_IMAGE=${DOCKER_IMAGE:-${CI_REGISTRY}/${CI_PROJECT_PATH}} - | if [ "${DOCKER_IMAGE}" = "/" ]; then @@ -35,7 +35,7 @@ docker:build:branches: except: - 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}:${CI_COMMIT_REF_SLUG} @@ -49,7 +49,7 @@ docker:build:release: only: - tags 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}:${VERSION} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d180caab..dbb5cdb4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,5 +9,4 @@ Overrides for these values can be set within the project, under `Settings` -> `C | `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. |