diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 675b0495..b3e190bd 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_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} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f6f3fc40..d180caab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. |