common publish status for multiple simultaneous builds
Answered
I have multiple Gitlab and build configurations triggered by one merge request, so I need global status "failed" if any of build fails and "passed" if all of builds are passed. But currently if previous build failed and last one is success, the status of merge request in Gitlab will be "success" which makes Publisher Commit Status useless. How to make common status, which will have to wait until all builds finished in particular commit?
Please sign in to leave a comment.
Given your situation, I think the best option would be to create a single final build configuration that has a snapshot dependency on all of your current ones, replace the trigger on the other builds with a trigger on this one, determine the status of the final configuration based on the results of the dependencies (this can be selected during the creation of the dependency), and then add the Commit Status Publisher to this new build (remove it from the other ones if you also want to avoid intermediate statuses to be published). That way, as it will always be executed last, the status of the request in gitlab should correspond to this one, which will fail under the conditions you determine.
Removing the triggers from the other builds and leaving it alone on the new one will make it so, that triggering this new one, all the rest will be added to the queue because of the dependency.