Skip to content

Add components for PagesDeployments

Janis Altherr requested to merge janis-add-pages-deployment-component into master

What does this MR do and why?

This MR has been split out from !155273 (merged)to reduce the review load. It adds the PagesDeployment component to the frontend files. However, since its parent component is part of the downstream MR it does not yet visibly display the deployment in the UI.

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

Primary Deployment

Screenshot_2024-06-13_at_09.30.49

Environment Deployment

Screenshot_2024-06-13_at_09.30.08

Expanded

Screenshot_2024-06-13_at_09.30.00

Stopped

Screenshot_2024-06-13_at_09.30.20

Primary Deployment, dark mode

Screenshot_2024-06-13_at_09.31.22

Environment Deployment, dark mode

Screenshot_2024-06-13_at_09.31.30

Primary Deployment, error state

Screenshot_2024-06-13_at_09.32.24

Environment Deployment, error state

Screenshot_2024-06-13_at_09.32.19

Mobile screen

Screenshot_2024-06-13_at_09.29.40

How to set up and validate locally

How to set up and validate locally

How to set up and validate locally

  1. Merge !155273 (merged) into this MR's branch. Should you encounter any conflicts, use "your version" as the other MR may fall behind this one.
  2. Set up your GDK to support Runners and Pages
  3. Enable the multi version feature flag with echo "Feature.enable(\"pages_multiple_versions_setting\")" | rails c
  4. Enable the ui feature flag with echo "Feature.enable(\"new_pages_ui\")" | rails c
  5. Create a Pages project, by creating a new project with the "pages/Plain HTML" template.
  6. Replace the below config in the .gitlab-ci.yml:
# This file is a template, and might need editing before it works on your project.
# Full project: https://gitlab.com/pages/plain-html

image: busybox

pages:
  stage: deploy
  script:
    - echo "Pages accessible through ${CI_PAGES_URL}/${PAGES_PREFIX}"
  variables:
    PAGES_PREFIX: "" # no prefix by default (master)
  pages:
    path_prefix: "$PAGES_PREFIX"
  artifacts:
    paths:
    - public
  rules:
    - if: $CI_COMMIT_BRANCH == "master" # ensure to run on master (with default PAGES_PREFIX)
      variables:
        PAGES_PREFIX: '' # prefix with _stg for the staging branch
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" # conditionally change the prefix on Merge Requests
      variables:
        PAGES_PREFIX: 'mr$CI_MERGE_REQUEST_IID' # prefix with the mr<iid>, like `mr123`
  1. Ensure the pipeline runs successfully and you have a pages deployment
  2. Create an MR in the project. Ensure the MR's pipeline creates a Pages deployment.
  3. Go to "Deploy > Pages" and view both the primary and the MR's deployment.
Edited by Janis Altherr

Merge request reports