Pass pipeline failure reason to a transition event
This commit is contained in:
parent
90fa4e7e54
commit
41d8030ec2
1 changed files with 6 additions and 0 deletions
|
@ -113,6 +113,12 @@ module Ci
|
|||
pipeline.auto_canceled_by = nil
|
||||
end
|
||||
|
||||
before_transition any => :failed do |pipeline, transition|
|
||||
transition.args.first.try do |reason|
|
||||
pipeline.failure_reason = reason
|
||||
end
|
||||
end
|
||||
|
||||
after_transition [:created, :pending] => :running do |pipeline|
|
||||
pipeline.run_after_commit { PipelineMetricsWorker.perform_async(pipeline.id) }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue