I'm currently trying to atopt my declarative pipeline in the following way:
I have multiple stages, some apply for all branches, some only for specific names.
What I'm now searching for is a way to get a when condition for the existance of a branch like this:
if branch b exist checkout branch b else checkout branch a
Sadly I haven't found a solution for it. I'm pretty sure there is a way using the git plugin though.
There's a solution for scripted pipelines. I can't translate them though.
Can someone help me with this or point me at the right direction?