Execute project hooks and services when deployment starts
What does this MR do?
Issues addressed: #235475 (closed) and #235474 (closed)
This MR implements webhook and chat (slack) integration notifications when a deployment starts. To achieve this a new worker is introduced (Deployments::ExecuteHooksWorker
) which would be triggered when the state of the deployment is transitioned to running
.
These are the major changes in this MR as suggested in this comment:
- Create
Deployments::ExecuteHooksWorker
that gets triggered whenever a deployment is changed torunning
,success
,failed
,canceled
. - Create
Deployments::UpdateEnvironmentWorker
that replacesDeployments::SuccessWorker
- Create
Deployments::LinkMergeRequestWorker
that replacesDeployments::FinishedWorker
- Rename
Deployments::AfterCreateService
toDeployments::UpdateEnvironmentService
Screenshots
UI text update in Slack integrations settings
Sample message in slack when a deployment has started
UI text update in Webhook settings
Sample payload from webhook request
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team