Improve syntax for variables expressions in 'only' and 'except': not equal
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=25865) </details> <!--IssueSummary end--> ## Description GitLab CI has basic support for variables expressions in `only` and `except` keyworks. Consider additional improvements that are useful for real world use cases and implement them. ## Proposal Support for `!=` and `!~` operators. They will check whether the rhs string or regex does not match the lhs variable. I would also hope that you would allow look-ahead assertions in the regex (which currently gets flagged as an invalid expression). ## Example != ``` variables: - $CI_COMMIT_REF_NAME != "master" ``` !~ ``` variables: - $CI_COMMIT_REF_NAME !~ /^v[0-9]/ ``` negative look-ahead (which could serve as a workaround for the lack of !=) ``` variables: - $CI_COMMIT_REF_NAME =~ /^(?!master$)./ ```
issue