Multiple Url support for Review Apps
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Release notes
Allow the support of multiple urls in a Review App environment.
Problem to solve
Sometimes we have multiple apps in 1 repository, e.g. a front and backend application, which have different urls. Currently you can only set 1 url per environment and generally these urls are dynamically generated on the hosting platform after a deployment. So currently there is only 1 button displayed in the Merge Request UI which opens the environment url.
Proposal
Allow the environment url property to be either a string or an array of strings like the example below:
deploy_review:
stage: deploy
script:
- sh deploy.sh
- DYNAMIC_URL_FRONTEND=$(get_url.sh --app=frontend)
- DYNAMIC_URL_BACKEND=$(get_url.sh --app=backend)
- echo "DYNAMIC_URL_FRONTEND=$DYNAMIC_URL_FRONTEND" >> deploy.env
- echo "DYNAMIC_URL_BACKEND=$DYNAMIC_URL_BACKEND" >> deploy.env
artifacts:
reports:
dotenv: deploy.env
environment:
name: $CI_COMMIT_BRANCH
url:
- $DYNAMIC_URL_FRONTEND
- $DYNAMIC_URL_BACKEND
on_stop: stop_review
Other sections to consider adding:
Intended users
- Developers
- DevOps Engineer
- QA Engineer
Edited by 🤖 GitLab Bot 🤖