Catalog the remaining CD deployment gate triggers

What does this MR do and why?

The CD deployment gate already consumes three trigger types (deployment_requested, environment_advanced, deployment_promoted), but only deployment_requested could be authored in the Policy Store (experimental).

  • Adds environment_advanced and deployment_promoted to the gem catalogue (gems/gitlab-policy-store, Triggers::ALL) and to the frontend editor drawer catalog.
  • REST/GraphQL catalog endpoints and Grape parameter validation derive from the gem constant, so the new types are picked up automatically. The model enum (values 1 and 2) and Triggers::TYPES already existed, so no migration is needed.
  • Renames the first trigger's display name from "Deployment" to "Deployment requested" so it reads as an event alongside its new siblings and no longer collides with the "Deployment" category label. All three triggers sit under the Deployment category.
  • Guard specs pin the catalogue bidirectionally to Triggers::TYPES and the model enum to the gem, so the two sides cannot drift.
  • Updates doc/api/policy_store.md.

References

Screenshots or screen recordings

Before After
N/A (new triggers did not exist)

Visual verification (local GDK): the Triggers drawer lists all three triggers under the Deployment category with their tooltips; a policy named "Deployment promotion gate" was created end-to-end with the deployment_promoted trigger and an Environment State rule, saved successfully, and appears in the policy list with the new trigger type label. Browser console clean (no errors).

How to set up and validate locally

  1. Enable the Policy Store experiment for a group in your GDK.
  2. Go to Secure > Policy store for that group.
  3. Select Create new policy.
  4. Open the Triggers tab and confirm the Deployment category lists Deployment requested, Environment advanced, and Deployment promoted.
  5. Add one of the new triggers plus any rule, then save.
  6. Confirm the policy appears in the policy list with the new trigger type.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Edited by Alexander Turinske

Merge request reports

Loading
Loading