Skip to content

Replace the approval modal with a link to the approval page

What does this MR do and why?

This MR removes the approval modal and replaces it with the link to the deployment details page, which has an embedded approval view.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen_Recording_2024-06-18_at_19.09.46 Screen_Recording_2024-06-18_at_19.02.27
Screen_Recording_2024-06-18_at_19.10.36 Screen_Recording_2024-06-18_at_19.03.42

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Add the following GitLab CI Yaml to a project
Click to expand
stages:
    - deploy
    - stop
image: alpine:latest

deploy-prod:
    stage: deploy
    script:
        - sleep 10
        - echo "deploying prod"
    environment:
        name: production
        url: postgres://example.com

deploy-staging:
    stage: deploy
    script:
        - echo "deploying staging I hope"
    environment:
        name: staging
        url: https://example.com
        on_stop: stop-staging
    when: manual

stop-staging:
  stage: stop
  script:
    - echo "stopping staging"
    - sleep 600
  environment:
    name: staging
    action: stop
  when: manual

deploy-development:
    stage: deploy
    script:
        - echo "deploying development"
    environment:
        name: development
        url: https://example.com
    when: manual

deploy-review:
    stage: deploy
    script:
        - echo "Deploying review/$CI_COMMIT_REF_NAME"
    environment:
        name: review/$CI_COMMIT_REF_NAME
        auto_stop_in: 1 week
    only:
        - branches
    except:
        - master
    when: manual


stop_review_app:
  script: stop-review-app
  stage: stop
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    action: stop
  rules:
    - if: $CI_MERGE_REQUEST_ID
      when: manual
  1. Run pipelines to create environments/deployments
  2. Protect the Production environment by navigating to Settings > CI/CD and add at least one deployment rule and at least one approval rule.
  3. Run another pipeline.
  4. Navigate to Operate -> Environments and click on the approval button.
  5. Verify the deployment details page opening with the dedicated approval section.
  6. Navigate to Operate -> Environments, select your environment, and click on the approval button.
  7. Verify the deployment details page opening with the dedicated approval section.

Related to #461058 (closed)

Edited by Anna Vovchenko

Merge request reports