diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-24 14:57:11 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-04-24 14:57:11 +0000 |
commit | 7734b834fb7aebc1c10f7e8ec20d74a208bd5a8b (patch) | |
tree | 9082bc450791c51ff48021ecfa4ce60c103ce4a6 /spec/models | |
parent | 4de9b14ce6137e5d44fd8b10e9566d220f1ebdcd (diff) | |
parent | d1b2056c155f49004a80280e46d7136fd804ad98 (diff) | |
download | gitlab-ce-7734b834fb7aebc1c10f7e8ec20d74a208bd5a8b.tar.gz |
Merge branch 'add-ci-variable-protected-ref' into 'master'
Add CI variable CI_REF_PROTECTED
See merge request gitlab-org/gitlab-ce!26716
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/bridge_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/ci/build_spec.rb | 3 | ||||
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/ci/bridge_spec.rb b/spec/models/ci/bridge_spec.rb index aacfbe3f180..44b5af5e5aa 100644 --- a/spec/models/ci/bridge_spec.rb +++ b/spec/models/ci/bridge_spec.rb @@ -33,7 +33,7 @@ describe Ci::Bridge do CI_PROJECT_ID CI_PROJECT_NAME CI_PROJECT_PATH CI_PROJECT_PATH_SLUG CI_PROJECT_NAMESPACE CI_PIPELINE_IID CI_CONFIG_PATH CI_PIPELINE_SOURCE CI_COMMIT_MESSAGE - CI_COMMIT_TITLE CI_COMMIT_DESCRIPTION + CI_COMMIT_TITLE CI_COMMIT_DESCRIPTION CI_COMMIT_REF_PROTECTED ] expect(bridge.scoped_variables_hash.keys).to include(*variables) diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 95b9bd4a4d9..3a7d20a58c8 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2183,7 +2183,8 @@ describe Ci::Build do { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true, masked: false }, { key: 'CI_COMMIT_MESSAGE', value: pipeline.git_commit_message, public: true, masked: false }, { key: 'CI_COMMIT_TITLE', value: pipeline.git_commit_title, public: true, masked: false }, - { key: 'CI_COMMIT_DESCRIPTION', value: pipeline.git_commit_description, public: true, masked: false } + { key: 'CI_COMMIT_DESCRIPTION', value: pipeline.git_commit_description, public: true, masked: false }, + { key: 'CI_COMMIT_REF_PROTECTED', value: (!!pipeline.protected_ref?).to_s, public: true, masked: false } ] end diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index fd66e344d63..3c823b78be7 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -690,7 +690,8 @@ describe Ci::Pipeline, :mailer do CI_PIPELINE_SOURCE CI_COMMIT_MESSAGE CI_COMMIT_TITLE - CI_COMMIT_DESCRIPTION] + CI_COMMIT_DESCRIPTION + CI_COMMIT_REF_PROTECTED] end context 'when source is merge request' do |