Commit d0ee45f4 authored by Russell Dickenson's avatar Russell Dickenson

Merge branch 'doc/except-rules' into 'master'

Add except example to only/except deprecation troubleshooting section

See merge request gitlab-org/gitlab!31518
parents 9ea5536e 6dc060f3
...@@ -394,6 +394,31 @@ spotbugs-sast: ...@@ -394,6 +394,31 @@ spotbugs-sast:
- if: $CI_MERGE_REQUEST_ID - if: $CI_MERGE_REQUEST_ID
``` ```
If your override is aimed at limiting jobs to only run on branches, not tags,
it would look similar to:
```yaml
include:
- template: SAST.gitlab-ci.yml
# Ensure that the scanning is not executed on tags
spotbugs-sast:
except:
- tags
```
To transition to the new `rules` syntax, the override would be rewritten as:
```yaml
include:
- template: SAST.gitlab-ci.yml
# Ensure that the scanning is not executed on tags
spotbugs-sast:
rules:
- if: $CI_COMMIT_TAG == null
```
[Learn more on the usage of `rules`](../../ci/yaml/README.md#rules). [Learn more on the usage of `rules`](../../ci/yaml/README.md#rules).
#### Pin your templates to the deprecated versions #### Pin your templates to the deprecated versions
......
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