Template Tasks can't be configured correctly
Summary
When using preconfigured tasks such as SAST, it is not very straightforward to disable the individual subtasks. This behaviour occured after the switch to rules instead of except/only.
When configuring the rules of the parent/main task, these updated/overwritten rules are not applied to the individual subtasks.
Steps to reproduce
- Include SAST (or any other) GitLab CI template.
- Configure root task of template to only run under certain condition (e.g. only on tags or merge requests)
- Commit something --> pipeline/template tasks still get executed since their rules aren't compliant to the updated root task rules.
Example Project
Have a look at repo to see an example ci config that's not working as expected
What is the current bug behavior?
Individual subtasks in template file are executed.
What is the expected correct behavior?
Individual subtasks inherit rules configuration of parent task (when overritten)
Relevant logs and/or screenshots
see https://gitlab.com/dennismaxjung/vscode-dotnet-auto-attach/-/pipelines
Output of checks
Gitlab.com
Possible fixes
Edited by Simon Bäurle