Use `rules:changes` instead of trigger labels to guard Gemnasium pipelines
Summary
We should update the Gemnasium pipeline to use rules:changes instead of manually set trigger labels.
Having conditional pipeline is a useful trait to have, but requiring a manually set label to identify the condition makes it possible to forget to include them, resulting in longer pipeline runs. Additionally, it can also act as another barrier to entry for contributors,
Improvements
The pipelines automatically trigger based on the code paths changed. Allows for more
advanced control of pipeline jobs triggered as well. For example, changing only the
CHANGELOG.md
could cause a smaller subset of the pipeline to run.
Risks
We could omit legitimate pipeline runs. For example, if we add a new parser for Language X, we'd need to remember to update the rules for directories used by Language X. This can be mitigated by having a default run for all pipelines if a rule doesn't match. This provides an upside that if we forget once, notice longer pipelines for these particular file changes, then we can update the rule once and have it take effect for future pipelines and provide the same benefits consistently.
Involved components
.gitlab-ci.yml
Optional: Intended side effects
- Consistently faster pipelines
- Improved developer experience