Hi,
What I want to do is to cancel a build that are still in the queue.
So I am wondering if there some description on how to cancel a build that a plugin started through AbstractProject.scheduleBuild2()
The QueueTaskFuture returned do have a cancel method, that at first seem to be a good idea to use, but as far as I can tell that will end up canceling the build at the head of the queue, not the one that belong to the scheduled build. Is this intentional?
Will iterating the Jenkins.instance.queue.items and cancel the item that match my previously future object work, or will that leave something behind that needs to be cleaned up?
Best regards
//Stefan