summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-09-03 19:15:28 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-09-04 16:12:50 +0200
commitd6c3446df5d238480d479861f2f3985f8e593306 (patch)
tree4ef53ea1a5fcf5f218770045c90c99d517e0c973
parent57bcd68b7c7bb8aecfb553514449f89791bac3c9 (diff)
downloadgitlab-ce-d6c3446df5d238480d479861f2f3985f8e593306.tar.gz
Start to remove config processor from Ci::Pipeline
-rw-r--r--app/models/ci/build.rb6
-rw-r--r--app/models/ci/pipeline.rb4
-rw-r--r--spec/models/ci/pipeline_spec.rb17
3 files changed, 0 insertions, 27 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 221cba8047a..a56cde7fbb4 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -797,12 +797,6 @@ module Ci
options&.dig(:environment, :url) || persisted_environment&.external_url
end
- def build_attributes_from_config
- return {} unless pipeline.config_processor
-
- pipeline.config_processor.build_attributes(name)
- end
-
def update_project_statistics_after_save
update_project_statistics(read_attribute(:artifacts_size).to_i - artifacts_size_was.to_i)
end
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 526bf7af99b..00aa8d136ba 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -419,10 +419,6 @@ module Ci
end
end
- def seeds_size
- stage_seeds.sum(&:size)
- end
-
def has_kubernetes_active?
project.deployment_platform&.active?
end
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 77b7332a761..2d5a1bcf046 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -399,23 +399,6 @@ describe Ci::Pipeline, :mailer do
end
end
- describe '#seeds_size' do
- context 'when refs policy is specified' do
- let(:config) do
- { production: { stage: 'deploy', script: 'cap prod', only: ['master'] },
- spinach: { stage: 'test', script: 'spinach', only: ['tags'] } }
- end
-
- let(:pipeline) do
- build(:ci_pipeline, ref: 'feature', tag: true, config: config)
- end
-
- it 'returns real seeds size' do
- expect(pipeline.seeds_size).to eq 1
- end
- end
- end
-
describe 'legacy stages' do
before do
create(:commit_status, pipeline: pipeline,