Skip to content

Create audit event when deploying to protected environment

What does this MR do and why?

Creates an audit event when deploying to a protected environment.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshot_2024-06-12_at_2.47.32_PM

How to set up and validate locally

  1. Create a project, and create a protected environment, adding your user/role as an allowed deployer.
  2. Add a CI template to deploy to your environment, for example:
       stages:
         - deploy
       
       production:
         stage: deploy
         script:
           - 'echo deploying..'
         environment: <your-env-name>
  3. Start a pipeline, and wait for the job above to run.
  4. Visit admin -> monitoring -> audit events and see that an event has been logged for the deployment starting.

Related to #456687 (closed)

Edited by Tiger Watson

Merge request reports