summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalasankar "Balu" C <balasankar@gitlab.com>2019-07-05 23:05:19 +0530
committerBalasankar "Balu" C <balasankar@gitlab.com>2019-07-10 20:23:03 +0530
commite04e7181cc6be7a47b634855c77fb0c2c4e53a8b (patch)
tree913f10744399d9ce6dec27b6f2f8e21dc55396dc
parentb76d4fadd4be35141df659b5ab2ba99b21c79ead (diff)
downloadgitlab-ce-e04e7181cc6be7a47b634855c77fb0c2c4e53a8b.tar.gz
Add CI variable to provide GitLab FQDN
Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>
-rw-r--r--app/models/concerns/ci/contextable.rb1
-rw-r--r--changelogs/unreleased/64161-gitlab-fqdn.yml5
-rw-r--r--spec/models/ci/build_spec.rb1
3 files changed, 7 insertions, 0 deletions
diff --git a/app/models/concerns/ci/contextable.rb b/app/models/concerns/ci/contextable.rb
index e1d5ce7f7d4..91dda803031 100644
--- a/app/models/concerns/ci/contextable.rb
+++ b/app/models/concerns/ci/contextable.rb
@@ -59,6 +59,7 @@ module Ci
variables.append(key: 'CI', value: 'true')
variables.append(key: 'GITLAB_CI', value: 'true')
variables.append(key: 'GITLAB_FEATURES', value: project.licensed_features.join(','))
+ variables.append(key: 'CI_SERVER_HOST', value: Gitlab.config.gitlab.host)
variables.append(key: 'CI_SERVER_NAME', value: 'GitLab')
variables.append(key: 'CI_SERVER_VERSION', value: Gitlab::VERSION)
variables.append(key: 'CI_SERVER_VERSION_MAJOR', value: Gitlab.version_info.major.to_s)
diff --git a/changelogs/unreleased/64161-gitlab-fqdn.yml b/changelogs/unreleased/64161-gitlab-fqdn.yml
new file mode 100644
index 00000000000..2946be37caa
--- /dev/null
+++ b/changelogs/unreleased/64161-gitlab-fqdn.yml
@@ -0,0 +1,5 @@
+---
+title: Add CI variable to provide GitLab HOST
+merge_request: 30417
+author:
+type: added
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index d98db024f73..78862de0657 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -2013,6 +2013,7 @@ describe Ci::Build do
{ key: 'CI', value: 'true', public: true, masked: false },
{ key: 'GITLAB_CI', value: 'true', public: true, masked: false },
{ key: 'GITLAB_FEATURES', value: project.licensed_features.join(','), public: true, masked: false },
+ { key: 'CI_SERVER_HOST', value: Gitlab.config.gitlab.host, public: true, masked: false },
{ key: 'CI_SERVER_NAME', value: 'GitLab', public: true, masked: false },
{ key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true, masked: false },
{ key: 'CI_SERVER_VERSION_MAJOR', value: Gitlab.version_info.major.to_s, public: true, masked: false },