提交 c15dc455 编写于 作者: G Grzegorz Bizon

Move and improvement comment in pipeline fixtures

上级 7450fe78
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册