Rethink and test CI/CD triggers
The current workflow rules and job rule seem to not work as desired and might need some reworking. Esp. deployment on tags is not executed.
First of all we need to decide when the test and deploy jobs are to be run. Here is a proposal:
- merge-request event: always
- tag: always - including deploy if respective variables are set
- push to mercurial topic without merge-request: never
- push to mercurial topic with merge-request: never - handled by merge-request event
- push to branch with merge-request: never - handled by merge-request event
- push to a branch matching
\d+\.[02468]
: always - version'ed branches - or add these as protected branches? - push to protected branches: always - or use specific names?
- push to non-protected branches: never - mimic topics
Notes:
- No. 6 to 8 are to mimic "not run on topic without merge-request" (git has no notion of "topic").
- For git: If a branch permitted to trigger a pipeline and a tag on this very commit are pushed, two pipelines are triggered. This is a restriction caused by git design: the tag is a different ref-object than then tag.
WDYT?
Edited by Hartmut Goebel