Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon | off until 20th June <grzegorz@gitlab.com>2018-06-12 15:17:50 +0300
committerGrzegorz Bizon | off until 20th June <grzegorz@gitlab.com>2018-06-12 15:17:50 +0300
commit77247771c96307c2d68cae0cc7da576b2cee109c (patch)
tree1aa8571bf80c6d697efb3f138a94185470e784ae /spec/models
parentda874de4e7a929e61d478805dc0dff83f1a5c641 (diff)
parent6633fbef4e6c7adaca9b1f1633640f09c3bc90d1 (diff)
Merge branch 'expose-ci-url' into 'master'
Add CI_{PIPELINE,JOB}_URL See merge request gitlab-org/gitlab-ce!19618
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/build_spec.rb3
-rw-r--r--spec/models/ci/pipeline_spec.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 0a0d7d3fea9..51b9b518117 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1548,7 +1548,9 @@ describe Ci::Build do
let(:predefined_variables) do
[
{ key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true },
+ { key: 'CI_PIPELINE_URL', value: project.web_url + "/pipelines/#{pipeline.id}", public: true },
{ key: 'CI_JOB_ID', value: build.id.to_s, public: true },
+ { key: 'CI_JOB_URL', value: project.web_url + "/-/jobs/#{build.id}", public: true },
{ key: 'CI_JOB_TOKEN', value: build.token, public: false },
{ key: 'CI_BUILD_ID', value: build.id.to_s, public: true },
{ key: 'CI_BUILD_TOKEN', value: build.token, public: false },
@@ -2171,6 +2173,7 @@ describe Ci::Build do
it 'does not return prohibited variables' do
keys = %w[CI_JOB_ID
+ CI_JOB_URL
CI_JOB_TOKEN
CI_BUILD_ID
CI_BUILD_TOKEN
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 2bae98dcbb8..a41657b53b7 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -194,7 +194,7 @@ describe Ci::Pipeline, :mailer do
it 'does contains persisted variables' do
keys = subject.map { |variable| variable[:key] }
- expect(keys).to eq %w[CI_PIPELINE_ID]
+ expect(keys).to eq %w[CI_PIPELINE_ID CI_PIPELINE_URL]
end
end
end