I am trying to build a Gitlab CI yml, that triggers a certain job:
- when the commit is tagged in the form x.y.z
- I trigger manually via the Gitlab webapp
- the commit message ends with a certain regex ("-build_doc")
with the bullets being logical or statements. I tried only statements and rules alike but couldn't figure it out.
Web and tag already worked like so:
script:
...
only:
- /^v(\d+)\.(\d+)\.(\d+)$/ #tag
- web
I also found this issue, which allows the commit message condition via only:variables, but now I struggled with the other two...
My trial with rules:
script:
...
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_COMMIT_MESSAGE =~ /^.*-build_doc$/'
- if: $CI_COMMIT_TAG
Any advice? Thanks!!