diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-19 14:43:02 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-08-19 14:43:02 +0200 |
commit | c15dc455f12a37713b82a9a2f1e1017d6fbfac5f (patch) | |
tree | d4ac6d7995becce6921a0abbd2e4bd97a3cd4c39 /db/fixtures | |
parent | 7450fe78000ac32ede0e363373585a846b4f0a0d (diff) | |
download | gitlab-ce-c15dc455f12a37713b82a9a2f1e1017d6fbfac5f.tar.gz |
Move and improvement comment in pipeline fixturesfix/pipeline-seeds-in-dev-env
Diffstat (limited to 'db/fixtures')
-rw-r--r-- | db/fixtures/development/14_pipelines.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/db/fixtures/development/14_pipelines.rb b/db/fixtures/development/14_pipelines.rb index 36b0d16bfb9..49e6e2361b1 100644 --- a/db/fixtures/development/14_pipelines.rb +++ b/db/fixtures/development/14_pipelines.rb @@ -74,6 +74,10 @@ class Gitlab::Seeder::Pipelines .merge(commands: '$ build command') Ci::Build.create!(attributes).tap do |build| + # We need to set build trace and artifacts after saving a build + # (id required), that is why we need `#tap` method instead of passing + # block directly to `Ci::Build#create!`. + setup_artifacts(build) setup_build_log(build) build.save @@ -93,11 +97,6 @@ class Gitlab::Seeder::Pipelines end def setup_build_log(build) - ## - # We need to set build trace after saving a build (id required) - # That is why we need `#tap` method instead of passing block - # directly to `Ci::Build#create!`. - # if %w(running success failed).include?(build.status) build.trace = FFaker::Lorem.paragraphs(6).join("\n\n") end |