Skip to content

Add environment tier to deployment webhooks

What does this MR do and why?

Add environment tier to deployment webhooks

Include environment tier on webhooks payload for deployment events.

Changelog: added

related to #410399 (closed)

How to set up and validate locally

  1. Go to any project settings and add Webhook for deployment events, you can use a https://webhook.site/ to setup a URL to receive the payload.
  2. Add any commit to the project repository. You will need the commit SHA later to create a deployment.
  3. Create any environment in the same project
  4. Create a deployment through API using CURL:
curl --data "environment=ENVIRONMENT_NAME&sha=SHA_FROM_STEP_2_COMMIT&ref=main&tag=false&status=success" \
     --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments"

Check the data received at https://webhook.site/, environment_tier property should be included in the webhook payload.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Felipe Cardozo

Merge request reports

Loading