Allow dots in Pages' path_prefix
What does this MR do and why?
This merge request enables the use of dots in the path_prefix in Pages URLs for Parallel Deployments. This is particularly useful for reflecting versioning conventions and allowing having different versions of a site, for example:
site.com/v1.1/path
site.com/v1.2/path
Dots are not allowed at the beginning or end of the path, they are trimmed.
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.
How to set up and validate locally
- Create "Create from template" project at
/projects/new
- Choose
Pages/Plain HTML
template - After the project is created, edit in pipeline editor the
.gitlab-ci.yml
file and add there the following path prefix:
pages:
stage: deploy
pages:
path_prefix: "v1.1"
- Commit the change
- After that navigate to Deploy > Pages, there should be a Parallel deployments section where you can find the path you specified, it should be similar to
https://test-project-22e7ca.gitlab.io/v1.1
. It's important to check whetherv1.1
was not replaced withv1-1
.
Related to #507423 (closed)
Edited by Alisa Frunza