Reputation: 479
I have a ci-cd pipeline where I am using the following except condition currently:
except:
- tags
- pushes
With the increasing conditions, now I have to use rules
. I cannot use only
and except
with rules now. Can someone help me with this?
I have tried the following snippet:
rules:
- if: 'tags && pushes'
when: never
But this gives the following error:
jobs:build_info:rules:rule if invalid expression syntax
Upvotes: 2
Views: 3419
Reputation: 2196
Use predefined environment variables:
rules:
- if: '$CI_PIPELINE_SOURCE == "push" || $CI_COMMIT_TAG != null'
when: never
Upvotes: 5