Commit b67356c5 authored by Harsh Chouraria's avatar Harsh Chouraria

Improve overriding stages example

For the default security jobs, the current examples
appear dated for situations where the `test` stage is
undefined. It is also lacking example names to use for
all the (currently, 4) types of includes available.

This change adds a more complete example on how to
override the stage name for every one of the included
jobs, in a copy-paste-able form.
parent 17e6278f
......@@ -522,13 +522,28 @@ This error appears when the included job's stage (named `test`) isn't declared i
To fix this issue, you can either:
- Add a `test` stage in your `.gitlab-ci.yml`.
- Change the default stage of the included security jobs. For example, with SpotBugs (SAST):
- Override the default stage of each security job. For example, to use a pre-defined stage name `unit-tests`:
```yaml
include:
template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/License-Scanning.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
spotbugs-sast:
stages:
- unit-tests
dependency_scanning:
stage: unit-tests
license_scanning:
stage: unit-tests
sast:
stage: unit-tests
.secret-analyzer:
stage: unit-tests
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment