Jenkins.NET
Jenkins.NET copied to clipboard
Add cancel commands
I added the cancel and stop command for build jobs in queue and in progress respectively. Needed the functionality for a pet project and thought maybe somebody else might find it useful. Depending on server setup theuser might need special privileges to carry out the commands.
Disclaimer: StopBuild supresses an error that seems to be a false positive.
Thanks for your work! Library was helpful.
Is there anything I can do to help get this merged? I have a situation where a Jenkins job can continue running (due to an underlying process), and the only way to stop and retry is to issue a cancel/stop/abort, whatever the terminology is, and then issue a retry.
I can checkout this merge request, and test it out in our environment to verify, if that's helpful.
The commit looks good, my main issue is that I don't use Jenkins anymore (for several years now) in favor of Kubernetes.
If I can find a containerized version of Jenkins that I can use for automated testing, I'd be happy to bring this project back to life.
I think there are some containerized Jenkins setups. Though I don't have much expertise in that area.
I have time tomorrow to do some manual testing on these changes. (assuming these changes allow for stopping a job that is running)
I was able to successfully Abort
a job, using the StopAsync
function that was added in this merge request.
I did not attempt to test the cancelling of a queue item. However, the route looks correct, and the code looks good.
So I think this code can be merged.
Would it be helpful if I also manually tested the CancelItemAsync
function?
Is it conceivable to merge in this commit without having to "bring this project back to life." ?