Add deployments to pages usage quotas tab
What does this MR do and why?
This MR continues to implement a Pages tab to the Usage Quotas page. While !153434 (merged) added the tab and the stats, this one adds the project list view (split out for easier review).
Issue: #476522 (closed)
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 clicking "delete" on a deployment
If project has more deployments than the limit
(Note: the display limit is actually hardcoded at 15, but has been lowered to 3 for taking this screenshot)
How to set up and validate locally
- 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
- Inside a group, create a Pages project, by creating a new project with the "pages/Plain HTML" template.
- Replace the below config in the
.gitlab-ci.yml
:
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
- Enable multiple deployments for your new project
- Create one or more MRs in the project. Ensure each MR's pipeline creates a Pages deployment.
- In the group's sidebar, visit Settings > Usage Quotas > Pages and view the new components
Closes #476522 (closed)
Edited by Janis Altherr