summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-05-01 17:09:33 +0200
committerTomasz Maczukin <tomasz@maczukin.pl>2018-05-07 16:56:08 +0200
commit698a0c479858b5d76f0ce18934a23c4ea5a1e332 (patch)
tree6fd6add8b6c259fccf344b6203b21600446a8945 /spec
parentbdc20840aaf5165e654498d011e6273d5e0fd240 (diff)
downloadgitlab-ce-698a0c479858b5d76f0ce18934a23c4ea5a1e332.tar.gz
Add a CI_COMMIT_MESSAGE predefined variable
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/build_spec.rb5
-rw-r--r--spec/models/ci/pipeline_spec.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 3158e006720..dc810489011 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -1518,7 +1518,10 @@ describe Ci::Build do
{ key: 'CI_PROJECT_VISIBILITY', value: 'private', public: true },
{ key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true },
{ key: 'CI_CONFIG_PATH', value: pipeline.ci_yaml_file_path, public: true },
- { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true }
+ { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true },
+ { key: 'CI_COMMIT_MESSAGE', value: pipeline.git_commit_message, public: true },
+ { key: 'CI_COMMIT_TITLE', value: pipeline.git_commit_title, public: true },
+ { key: 'CI_COMMIT_DESCRIPTION', value: pipeline.git_commit_description, public: true }
]
end
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index dd94515b0a4..ddd66a6be87 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -173,7 +173,7 @@ describe Ci::Pipeline, :mailer do
it 'includes all predefined variables in a valid order' do
keys = subject.map { |variable| variable[:key] }
- expect(keys).to eq %w[CI_PIPELINE_ID CI_CONFIG_PATH CI_PIPELINE_SOURCE]
+ expect(keys).to eq %w[CI_PIPELINE_ID CI_CONFIG_PATH CI_PIPELINE_SOURCE CI_COMMIT_MESSAGE CI_COMMIT_TITLE CI_COMMIT_DESCRIPTION]
end
end