diff --git a/app/models/project.rb b/app/models/project.rb index 71e220871878328ac2d666c6763a17062bd9509f..a2a91888a54edb4ca5aae2555412d10813851e70 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1182,7 +1182,10 @@ class Project < ActiveRecord::Base { key: 'CI_REGISTRY', value: Gitlab.config.registry.host_port, public: true } ] - variables << { key: 'CI_REGISTRY_IMAGE', value: container_registry_repository_url, public: true } if container_registry_enabled? + if container_registry_enabled? + variables << { key: 'CI_REGISTRY_IMAGE', value: container_registry_repository_url, public: true } + end + variables end diff --git a/doc/ci/variables/README.md b/doc/ci/variables/README.md index c9eebec801daeec8ec88691e559b92154955feb7..4bf610f0e9a7ebdedeed12af347811061784b5b3 100644 --- a/doc/ci/variables/README.md +++ b/doc/ci/variables/README.md @@ -44,7 +44,7 @@ The `API_TOKEN` will take the Secure Variable value: `SECURE`. | **CI_PROJECT_DIR** | all | all | The full path where the repository is cloned and where the build is run | | **CI_REGISTRY** | 8.10 | 0.5 | If the Container Registry is enabled it returns the address of GitLab's Container Registry | | **CI_REGISTRY_IMAGE** | 8.10 | 0.5 | If the Container Registry is enabled for the project it returnes the address of the registry tied to the specific project | -| **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of the used runner | +| **CI_RUNNER_ID** | 8.10 | 0.5 | The unique id of runner being used | | **CI_RUNNER_DESCRIPTION** | 8.10 | 0.5 | The description of the runner as saved in GitLab | | **CI_RUNNER_TAGS** | 8.10 | 0.5 | The defined runner tags |