diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-16 20:21:01 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-18 13:17:48 +0200 |
commit | a6260b1eb7b4f30817d0cc5dbd80c860b5ed8a31 (patch) | |
tree | eff508f9ae191455a25088448d8700ce96aedb42 | |
parent | 9a74b92d2afe028453c3fde7221fce20bcb073d9 (diff) | |
download | gitlab-ce-a6260b1eb7b4f30817d0cc5dbd80c860b5ed8a31.tar.gz |
Remove code that removes duplicate CI variables
At this point this is being handled by GitLab Runner and we need to
introduce this as a separate merge request.
-rw-r--r-- | app/models/ci/build.rb | 3 | ||||
-rw-r--r-- | spec/models/build_spec.rb | 13 |
2 files changed, 1 insertions, 15 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 1146028b9a9..85ef0523b31 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -147,8 +147,7 @@ module Ci end def variables - (predefined_variables + yaml_variables + project_variables + trigger_variables) - .reverse.uniq { |var| var[:key] }.reverse + predefined_variables + yaml_variables + project_variables + trigger_variables end def merge_request diff --git a/spec/models/build_spec.rb b/spec/models/build_spec.rb index 5ee40c22536..b5d356aa066 100644 --- a/spec/models/build_spec.rb +++ b/spec/models/build_spec.rb @@ -253,19 +253,6 @@ describe Ci::Build, models: true do ) end end - - context 'when job variable has same key other variable has' do - let(:build) { create(:ci_build, name: 'production') } - - it 'contains job yaml variable' do - expect(subject).to include(key: :DB_NAME, value: 'mysql', - public: true) - end - - it 'contains only one variable with this key' do - expect(subject.count { |var| var[:key] == :DB_NAME } ).to eq 1 - end - end end end end |