Is there any event that can be handled by a custom event handle so that when a user clicks the Merge Check button on the pull request web page a pre-merge sanity build can be kicked off? If the sanity build passes then the merge can proceed. Otherwise, the merge will not happen.
I had already used a custom merge check to enable/disable the Merge Check button when certain conditions happened, e.g. allowed merge only when the ToRef branch was "feature/<name>". But in the above case we will like to save Jenkins resources by starting the sanity build only when the user clicks on the Merge Check button.
I just wrote a really long answer and when I posted it this thing told me:
I can't face typing it all again, but approximately I said:
You should avoid doing this on a merge check. Merge checks should be quick and they run often.
One option might be to:
Another possible way is to add an event handler on GitMergeRequestedEvent, that, if no builds are associated with the PR, kicks one off, then calls .cancel() with a sensible error message.
If a passed build is associated with the PR it can allow the merge to proceed.
I'd be lying if I was to tell you that all this is super-easy.
Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs