Add components for PagesDeployments
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
Environment Deployment
Expanded
Stopped
Primary Deployment, dark mode
Environment Deployment, dark mode
Primary Deployment, error state
Environment Deployment, error state
Mobile screen
How to set up and validate locally
How to set up and validate locally
How to set up and validate locally
- 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.
- Set up your GDK to support Runners and Pages
- Enable the multi version feature flag with
echo "Feature.enable(\"pages_multiple_versions_setting\")" | rails c
- Enable the ui feature flag with
echo "Feature.enable(\"new_pages_ui\")" | rails c
- Create a Pages project, by creating a new project with the "pages/Plain HTML" template.
- 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`
- Ensure the pipeline runs successfully and you have a pages deployment
- Create an MR in the project. Ensure the MR's pipeline creates a Pages deployment.
- Go to "Deploy > Pages" and view both the primary and the MR's deployment.
Edited by Janis Altherr