Display the tier of the environment on page
What does this MR do and why?
Environments fall into one of 5 tiers:
- production
- staging
- development
- testing
- other
Displaying the tier helps a user to categorize their environments at a glance.
Changelog: added
Screenshots or screen recordings
How to set up and validate locally
- Add the following
.gitlab-ci.yml
to a project for some deployments:
stages:
- deploy
- stop
image: alpine:latest
deploy-prod:
stage: deploy
script:
- sleep 6000
- echo "deploying prod"
environment:
name: production
deploy-staging:
stage: deploy
script:
- echo "deploying staging"
environment:
name: staging
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:
- main
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
- Run a pipeline
- View Deployments > Environments
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
For #322600 (closed)
Edited by Andrew Fontaine