Commit 242d3635 authored by Fabio Pitino's avatar Fabio Pitino

Execute build hooks on pending status

Run build hooks (webhooks and integrations) when
a build changes status to pending.

Changelog: added
parent 680c4923
......@@ -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