Improve syntax for variables expressions in 'only' and 'except': regex
We have a basic support for variables expressions in
except keyworks, but the original proposal was cut in scope to keep it small and simple in the first iteration. We can now consider additional improvements that are useful to real cases and implement them.
Adding the regex operator will allow jobs to be done/not done based on patterns.
- Skip a job based on a custom commit message
except: variables: - $CI_COMMIT_MESSAGE =~ /ci-skip-e2e/
- Run a job only if the feature is supported in the current GitLab instance/account
only: variables: - $GITLAB_FEATURES =~ /dependency_scanning/
=~ operator (regex)