err-jenkins
err-jenkins copied to clipboard
Allow chaining commands in bender
The idea is that the user would be able to to the following (perhaps with a different syntax)
!build <some-job-name> !merge <branch-name>
Which means that, after the command !build
finishes, call the command !merge
.
But only if the first command succeeds, right? Do we have a notion of "success" for bender commands?
The "build" command succeed when bender can trigger the job. The job build state change is another event.
Then that's something to consider, because I imagine that we don't want to merge if the job triggered by the build command fails
merge
is actually implemented on err-stash
here and for now we don't know whether it succeeded or not.
I think this comes in line with the proposed gate keeper. I don't think we have it in our short time planning.
Another thing that should be considered. If the triggered job succeeds and that cause another downstream job to be started? A merge could fail since stash already know there is another build for that commit running; Or bender could try to merge before jenkins notify about the build and the merge and branch deletion happens. I don't have idea of what will happen if jobs_done try to remove a job with an ongoing build.
Then that's something to consider, because I imagine that we don't want to merge if the job triggered by the build command fails
True @tigarmo, this process of build followed by merge would only be safe if a merge check of minimum number of successful builds is enabled in stash.