I'd like to automatically have Jenkins jobs execute for reviews in much the same way you could have builds per feature branch with GitHub/GitLab integrated with Jenkins. The multibranch pipeline using Perforce Swarm seems promising: it creates new jobs automatically for the branches of that Swarm project, and also creates jobs for each review (effectively a feature branch). This is nice because now I have jobs that are automatically managed and I can create plugins and other artifacts in my build. However, I also want build health to be reported back to Swarm so reviewers can easily see if there are problems. Going back to GitLab as an example, you would see right there in the merge request that there is a build failure.
Swarm seems to have a way to do that by setting the project to call an endpoint on a Jenkins job whenever a review is created or updated. By doing this, reviews invoke a Jenkins job and then the status is shown in the review (pass or fail). This is what I want to see. However, that means that I lose the dynamic jobs, which is really nice for keeping builds and their artifacts organized. As I mentioned, each review build (feature branch) creates a plugin artifact; having multiple review builds interleaved in a single Jenkins job seems... messy.
So, here's my problem: it seems like these two ways of working are opposite to one another instead of working together. I can either have Jenkins figure out the build automatically (multibranch) and create a build for each review, but then Swarm never knows the build status; or I can have Swarm trigger the review so it knows about build status, but then I lose the clean organization and build management that the multibranch pipeline build gives me.
Is there any way to have my cake and eat it too? It doesn't seem like an unreasonable thing to want to do. As I mentioned, this works great with git. Am I just approaching this the wrong way?