DAST template job overrides pipeline stages
The CI template for DAST specifies pipeline stages, potentially overriding stages set elsewhere.
Steps to reproduce
I have a project at
enverus/global/pipelines with a CI/CD configuration file named
global.yml that includes pipeline stages.
In a project, if I include
global.yml and then include the
Security/DAST.gitlab-ci.yml template, the template overrides my pipeline stages.
What is the current bug behavior?
stages: - build - test - deploy - dast
Depending on include order, this can override pipeline stages declared elsewhere.
What is the expected correct behavior?
Security/DAST.gitlab-ci.yml template shouldn't be specifying any pipeline stages.
Relevant logs and/or screenshots
stages: - Check - Build - Package - Static Tests - Review - Stage - Dynamic Tests - Release - Post-Release - Evaluate - Cleanup
job_a specifies the stage
Static Tests declared in
include: - project: enverus/global/pipelines ref: latest file: global.yml - template: Security/DAST.gitlab-ci.yml job_a: stage: Static Tests script: - echo "Hello, world!"
Error from CI Lint:
Security/DAST.gitlab-ci.yml template has replaced the stages with
Status: syntax is incorrect job_a job: chosen stage does not exist; available stages are .pre, build, test, deploy, dast, .post
Output of checks
This bug happens on GitLab.com.