Currently I have such pipeline structure:
Lint | Test | Deploy |
---|---|---|
lint | test-int | pages |
test-stg |
What I would like to do is when I execute either test-int
or test-stg
to execute / re-run the pages
job to upload the latest artifacts.
What I managed to do so far is to execute the pages
job when test-int
is manually executed for the first time. If I manually re-run test-int
, the pages
job is not executed again..
Here is my script:
image: mcr.microsoft.com/playwright:v1.27.0-focal
before_script:
- npm ci
stages:
- lint
- test
- deploy
lint:
stage: lint
tags:
- build
- docker
script:
- npx eslint . --ext .cjs,.js,.ts
- npx gherkin-lint
only:
- branches
- tags
test-int:
stage: test
tags:
- dev
- gib
- docker
script:
- npm run test:int
only:
- branches
- tags
when: manual
test-stg:
stage: test
tags:
- dev
- gib
- docker
script:
- npm run test:stg
only:
- branches
- tags
when: manual
pages:
stage: deploy
needs:
- test-int
tags:
- dev
- gib
- docker
script:
- echo "Deploying automation reports to Gitlab Pages..."
artifacts:
paths:
- public
only:
- branches
- tags