I am trying to setup a build that runs all my tests on the branches, but when merged into master it builds artifacts. I have tried several options but I am unable to get it to work exactly the way I want.
Right now I have two plans, but I think I should be able to combine them into one. My ideal plan would be a branch plan that runs all the tests on the branches, but does not build artifacts. Then when merged to master it would repeat the tests, and build the artifacts.
I am not able to achieve this because branch plans also build artifacts and I cannot seem to find a way to disable that.
I have also tried setting up two plans, one that builds branches without artifacts, and one that builds master with artifacts. However when merging to master it runs both plans. I think this is because in the branch plan I have master selected in the Repositories tab. I must select a branch in the Repositories tab because it is a required field, I also cannot select a different branch because all the other branches are feature or bug branches so they get removed when merging.
So I guess I have two questions.
- how can I setup a branch plan that only builds artifacts on master (not branches)? or
- how can I setup a branch plan to not build on the default (master) branch, only on the branches? (I have already tried the "Only create branches that match" option, it doesn't work because master is the main branch for the default stage)