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
path: root/db
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-06-01 21:46:34 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-06-01 21:46:34 +0300
commitf62603286d72d42e5b4e87b8f7f7bd6094407f1b (patch)
treef27b97f601359a34de49ae202848c341f6535553 /db
parente9a98d3d2dbf8d7d9c181a5505c5d3a3200d711b (diff)
Fix other use of CreateDeploymentService and make
it a bit more robust against missing options, which we did guard on for some cases.
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/17_cycle_analytics.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/db/fixtures/development/17_cycle_analytics.rb b/db/fixtures/development/17_cycle_analytics.rb
index 75457b2d369..7c1d758dada 100644
--- a/db/fixtures/development/17_cycle_analytics.rb
+++ b/db/fixtures/development/17_cycle_analytics.rb
@@ -212,12 +212,9 @@ class Gitlab::Seeder::CycleAnalytics
merge_requests.each do |merge_request|
Timecop.travel 12.hours.from_now
- CreateDeploymentService.new(merge_request.project, @user, {
- environment: 'production',
- ref: 'master',
- tag: false,
- sha: @project.repository.commit('master').sha
- }).execute
+ job = merge_request.head_pipeline.builds.where.not(environment: nil).last
+
+ CreateDeploymentService.new(job).execute
end
end
end