Hi, I'm looking for some feedback regarding making my plugin work in distributed Jenkins (master/slave) setups. For now I have made a "private static class DeployCallable extends MasterToSlaveCallable<Boolean, InterruptedException>" internal class with all my code being inside the "public Boolean call() throws InterruptedException" method. I then just call this method with " launcher.getChannel().call(deployCallable)".
https://github.com/jenkinsci/osf-builder-suite-for-sfcc-deploy-plugin/blob/master/src/main/java/org/jenkinsci/plugins/osfbuildersuiteforsfcc/deploy/DeployBuilder.java#L413 I think current code should work in a distributed Jenkins (master/slave) setup. I just have one problem, if a user cancels the build from the master my plugin does not get interrupted and still gets executed until the end and only then the job is marked as canceled even tough it still finished doing everything. I have described this issue here https://issues.jenkins-ci.org/browse/JENKINS-46705 Is there anything that I can do? I'm thinking of breaking my "do it all" " DeployCallable" into smaller pieces. Like one DeployCallable class to prepare the build and return a list of folders to be deployed, then another DeployCallable class that will zip one folder and iterate from master over the list returned by the first callable and then call this other Callable to zip one folder at a time, then another DeployCallable class that will upload the zip files and do the same iterate over the list of zips generated by the previous callable and call this Callable for each zip to upload it. Would this make sense? I think in this case the interrupted exception might work? But my code will be more complicated and ugly. What are my options? What can I do? Thank you. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/44a583ac-c6b7-43b1-b62a-da9d9497adff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
