mirror of
https://gitlab.com/components/sast.git
synced 2025-06-30 23:48:27 +02:00
Apply review feedback
This commit is contained in:
parent
fe3758e949
commit
551d5fb89b
1 changed files with 4 additions and 1 deletions
|
@ -17,15 +17,18 @@ include:
|
||||||
|
|
||||||
where `<VERSION>` is the latest released tag or `main`.
|
where `<VERSION>` is the latest released tag or `main`.
|
||||||
|
|
||||||
If you want to leverage the `$SAST_DISABLED` variable to run the jobs conditionally use `include:rules` with `when: never`. Otherwise all SAST jobs will always run when applicable:
|
If you are converting the configuration to use components and want to leverage the existing variable `$SAST_DISABLED` you could conditionally include the component using the variable:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
include:
|
include:
|
||||||
- component: gitlab.com/gitlab-components/sast@main
|
- component: gitlab.com/gitlab-components/sast@main
|
||||||
rules:
|
rules:
|
||||||
- if: $SAST_DISABLED == "true" || $SAST_DISABLED == "1"
|
- if: $SAST_DISABLED == "true" || $SAST_DISABLED == "1"
|
||||||
|
when: never
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Otherwise all SAST jobs will always run when applicable.
|
||||||
|
|
||||||
This assumes `SAST_DISABLED` variable is already defined in `.gitlab-ci.yml` with either `'true'` or `'1'` as the value:
|
This assumes `SAST_DISABLED` variable is already defined in `.gitlab-ci.yml` with either `'true'` or `'1'` as the value:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue