I'm trying to deploy a simple .html report, which is created after testing, to the Gitlab Pages. Everything is pretty straightforward according to the official documentation however, I'm constantly getting the 404 status when I open the https://DOMAIN/$CI_PIPELINE_ID/$REPORT
link (this is an example URL).
I did the same yesterday, and all was relatively good - reports went live, though not for a long time, maybe because new pipeline was overwriting already existing Page.
I have two questions:
1. What may be the reason for a URL to return the 404?
2. Is it possible to keep Pages from previous pipelines still accessible by their URL after a new pipeline succeeds? I used this approach by creating folders with unique titles based on the pipeline ID inside the public/
folder, and put .html files inside. However, I cannot check it because of the 404 status.
public\ folder looks smth like this:
├── public
│ ├── 1234567
│ │ ├──report_1.html
│ ├── 1234568
│ │ ├──report_.html
.gitlab-ci.yml
stages:
- test
- publish
cache:
paths:
- public
test:
stage: test
...
pages:
stage: publish
script:
- mkdir -p public/$CI_PIPELINE_ID
- REPORT=$(ls report*.html)
- cp report* public/$CI_PIPELINE_ID/
artifacts:
name: “$CI_PIPELINE_ID”
paths:
- public
expire_in: never
rules:
- if: $TASK_NAME == “load_tests”