Tag/Branch filters should be AND, not OR
planned
Salil Subbakrishna
planned
Hi all, we've been looking into this and we have a partial solution with more to come. We recently added a new logical operator called "matches" (https://circleci.com/docs/2.0/configuration-reference/#using-when-in-workflows) that returns true/false if a value (say the pipeline value for the branch or tag) matches a given regex. Since this will all be in a "when", you can combine tag/branch filters in any way you want using AND/OR. The reason this is a partial solution is that we only have this available in places where you can use a "when", which covers workflows/steps within a job, but does not cover jobs within a workflow. However, we are looking into a "when" that can be used for jobs within a workflow.
J
James Carlson
Salil Subbakrishna: Any updates on this? It's been over a year since your last update? I could really use a "when" operator for the jobs within a workflow.
Liya Ai
James Carlson: Hi James - no updates here yet, we know this is a highly requested idea but are still looking into the most optimal implementation for our customers. I will share updates as I have them from our PM team. Thanks!
Salil Subbakrishna
Merged in a post:
Allow multiple filters together AND/OR
K
Kyle Tryon
Made in response to this discuss post: https://discuss.circleci.com/t/circle-2-0-workflow-filters-should-be-logical-and-not-or/18231
These two filters should logically AND meaning both must be true to execute. This currently accepts either as a valid option, a logical OR.
- deploy_production: requires: - build_and_push filters: tags: only: /^v\d+.\d+.\d+$/ branches: only: /^release$/
CCI-I-869
joe
we should definitely have the option of AND and OR, but, not enforce one way...
Robert de Lorimier
Yes!
B
Bastian Ermann
+1
O
Oleh Ka
+1 for AND
R
Rich Bannon
+1
a
a a
+1
f
fran memo
I need this
A
Ahmed AbdelMagied
+1 for AND
Load More
→