Commit 6b90a7a6 authored by Furkan Ayhan's avatar Furkan Ayhan

Merge branch 'hooks-for-pending-builds' into 'master'

Execute hooks when build transitions to pending status

See merge request gitlab-org/gitlab!75737
parents 77082eb6 242d3635
......@@ -288,6 +288,7 @@ module Ci
build.run_after_commit do
BuildQueueWorker.perform_async(id)
BuildHooksWorker.perform_async(id)
end
end
......
......@@ -3762,6 +3762,12 @@ RSpec.describe Ci::Build do
build.enqueue
end
it 'queues BuildHooksWorker' do
expect(BuildHooksWorker).to receive(:perform_async).with(build.id)
build.enqueue
end
end
describe 'state transition: pending: :running' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment