Proposal: Gitlab-ci "except: - changes: - limited to:"
Problem to solve
When making small changes that are mainly devops related, or small config changes, I don't need to run all of the jobs in the pipeline.
For example, if I'm just updating
gitlab-ci.yml, I don't need to run all of the unit and acceptance tests in the pipeline.
- Rachel (Release Manager)
- Delaney (Development Team Lead)
- Sasha (Software Developer)
- Devon (DevOps Engineer)
The main use case I envisage for this feature is being able to skip running huge test suites that aren't actually testing anything that you've changed.
For example if you're just updating a deployment script, or some production config, then running the test suite again is a waste of time. None of the code you changed is going to be tested, and it just slows everything down.
The existing method of using
only: changes lets you run the tests if certain files have been updated. You could potentially try and whitelist all files that would be tested, but this is dangerous, as someone might create some files that your pattern misses.
except: changes: limited_to: - gitlab-ci.yml - config/**/* - bin/codedeploy/**/*
If the entire changeset only includes files that match the patterns defined in the array, then the job is skipped.
Permissions and Security
Same as existing only/except rules