0

I am writing a pipeline that will vary its behavior based on the branch being edited.

I am using gitflow and have a branch named

feature/my-feature

My pipeline has

 when { anyof { branch 'develop'; branch '.*feature.*'} } ... some steps... 

The problem is that when I run the pipeline my condition evaluates to false and my step is not run. I have tried a few different variations using both regex and Glob syntax: 'feature*', '.*feature', '*feature*' but cannot seem to get a match.

1 Answer 1

1

You are using Regex syntax (.*), but the branch condition only works with Glob syntax. So it should work using branch '*feature*'.

Sign up to request clarification or add additional context in comments.

1 Comment

I tried Glob syntax too and I am still getting the same results.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.