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 <grzesiek.bizon@gmail.com>2016-04-16 21:21:01 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-04-18 14:17:48 +0300
commita6260b1eb7b4f30817d0cc5dbd80c860b5ed8a31 (patch)
treeeff508f9ae191455a25088448d8700ce96aedb42
parent9a74b92d2afe028453c3fde7221fce20bcb073d9 (diff)
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.rb3
-rw-r--r--spec/models/build_spec.rb13
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