pages.path_prefix not applied
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
I tried setting up parallel pages deployments as shown in https://about.gitlab.com/blog/gitlab-pages-features-review-apps-and-multiple-website-deployment/ but the pages.path_prefix does not seem to have any effect.
Steps to reproduce
- Configure a pipeline using the code provided in the next section.
- Run the pipeline to create a Pages deployment.
- Create a branch and merge request to main to trigger a merge request pipeline.
- Once it finishes, navigate to Deploy > Pages.
- Note that the Pages deployment created in step 2. (with no
path_prefix) got updated.
Example Project
create-pages-deployment:
stage: deploy
script:
- mkdir public
- echo Hello world > public/index.html
pages: true
artifacts:
paths:
- public/
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
create-pages-review-app:
stage: deploy
script:
- mkdir public
- echo Hello world > public/index.html
pages:
path_prefix: 'mr-$CI_MERGE_REQUEST_IID' # Prefix with the mr-<iid>, like `mr-123`
artifacts:
paths:
- public/
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
What is the current bug behavior?
The merge request pipeline updates the main Pages deployment as if the path_prefix was not set.
What is the expected correct behavior?
A parallel Pages deployment should be created by the merge request pipeline. Its URL should have an additional /mr-$CI_MERGE_REQUEST_IID path component.
GitLab environment info
GitLab Self-Managed, v18.3.1-ee
Edited by 🤖 GitLab Bot 🤖