Using a multibranch pipeline I'd like trigger a slightly different build and deploy procedure depending on which git branch has triggered the build.
The two approaches I can think of are : 1) Use a different jenkins file in each branch 2) Use a series of when {branch 'X'} blocks in the jenkins file
The first approach mean I'll need to be careful when merging branches which I know I'll forget to be at some point.
The second approach is pretty messy but does mean I can use just one Jenkins file.
I can't believe there isn't a better way than these two approaches.