diff options
author | Adrian Moisey <adrian@changeover.za.net> | 2019-01-29 16:47:25 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-01-29 16:47:25 +0000 |
commit | 88d1ec62fe60b21d86e87a0b4300c98dc36add62 (patch) | |
tree | 847787417da688a3b889619e031da6c8aa75eb54 /app/models/project.rb | |
parent | 79b0bd738d9ae36f0fd5cd20bfe7175a0523d954 (diff) | |
download | gitlab-ce-88d1ec62fe60b21d86e87a0b4300c98dc36add62.tar.gz |
Add GitLab Pages predefined variables
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 15465d9b356..b509120ff83 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1689,11 +1689,19 @@ class Project < ActiveRecord::Base .append(key: 'CI_PROJECT_NAMESPACE', value: namespace.full_path) .append(key: 'CI_PROJECT_URL', value: web_url) .append(key: 'CI_PROJECT_VISIBILITY', value: visibility) + .concat(pages_variables) .concat(container_registry_variables) .concat(auto_devops_variables) .concat(api_variables) end + def pages_variables + Gitlab::Ci::Variables::Collection.new.tap do |variables| + variables.append(key: 'CI_PAGES_DOMAIN', value: Gitlab.config.pages.host) + variables.append(key: 'CI_PAGES_URL', value: pages_url) + end + end + def api_variables Gitlab::Ci::Variables::Collection.new.tap do |variables| variables.append(key: 'CI_API_V4_URL', value: API::Helpers::Version.new('v4').root_url) |