Proposal: Gitlab-ci "except: - changes: - limited to:"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

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.

Intended users

Further details

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.

Proposal

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

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Links / references

Edited by 🤖 GitLab Bot 🤖