Hi,
I want:
- Start the pipeline if the commit branch is master
-
EXCEPT if the commit message / title contains a
<regex>
...
script:
- apt update
....
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: always
- if: $CI_COMMIT_TAG !~ /^Weekly_Release_.*/ || $CI_COMMIT_TITLE =~ /^Finish.+Weekly_Release.*/
when: never
or do I understand the when: always
wrong ?
The problem is … if the developer creating a release, than it will be pushed to master branch which contains as git message “Finish Weekly_Release_20_2022”. That will trigger the first pipeline, and then they push (afterwards) a Git tag “Weekly_Release_2022” on the master branch and this triggers the 2nd pipeline, which I don’t want.
So I want to avoid a run, if push to master and $CI_COMMIT_TITLE OR $CI_COMMIT_MESSAGE contains the words above …
What I’m doing wrong ?
cu denny