Skip to content

Link to the deployment details page for jobs waiting for approval

What does this MR do and why?

Previously, when a job requires an approval, the user is directed to the Environment details page with a list of multiple deployments.

With this change, the user is instead directed to the relevant Deployment details page.

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

AFTER

Job page - references and links to the deployment details page

after-job-page

The deployment details page

deployment-details-page

BEFORE

Job page - references and links to the environments details page

deploy-job-page

The environment details page

environment-details-page

How to set up and validate locally

  1. Create a new project or choose an existing project

  2. Set up a simple deploy job, e.g.:

    deploy-staging:
      stage: deploy
      environment:
        name: staging
        action: start
      script:
        - echo "Deploying application..."
        - echo "Application successfully deployed."
  3. Protect the environment and make sure that it requires approvals. See documentation for this setup, or follow the steps below:

    1. Go to Project Settings -> CI CD -> Protected Environments
    2. Select an Environment to protect (in this example, we are protecting the staging environment)
    3. Select approvers and make sure that it requires at least 1 approval
  4. Go back to your Pipelines page (Build -> Pipelines), and run a new pipeline

  5. When you navigate to the recently created pipeline and click on the deploy-staging job, there will be a message indicating that the job must be approved. The message should reference and point to the deployment details page instead of the environment details page. (See screenshots section above for illustrations.)

Related to #435464 (closed)

Edited by Max Fan

Merge request reports