Thanks for your answer, I can do as what you said. But there is another problem.
Currently I remove the publisher in the BuildWrapper, which is under the 'Build Environment' section, and if I understand right, I would need to re-add this publisher after the build finished, which means I need to add it in the "*Post-build Actions*" section. Thus my plugin need to configure in both 'Build Environment' section and " "*Post-build Actions*" section. I want to my user to only configure in the 'Build Environment' section. Is there an way I can re-add the publisher after the build finishes but without extra configuration ? On Tuesday, May 3, 2016 at 4:49:17 AM UTC+8, Baptiste Mathus wrote: > > Not that I know of. But you should also be able to indeed remove it, save > it, do what you need, then re-add it? > > 2016-05-02 18:16 GMT+02:00 icetree521 <[email protected] <javascript:>>: > >> I am developing an jenkins plugin. I wonder whether there is a way to >> temporarily remove or disable a publisher ? For example, if I execute >> *publishers.remove(fp), *then this publisher will lost permanently. >> Is there a way to only temporarily remove or disable it ? >> >> AbstractProject project = build.getProject(); >> DescribableList publishers = project.getPublishersList(); >> final Fingerprinter fp = (Fingerprinter) publishers.get(hudson.tasks. >> Fingerprinter.class); >> publishers.remove(fp); >> >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jenkinsci-dev/0ee40860-571a-4f56-bf15-1f7e619aef64%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jenkinsci-dev/0ee40860-571a-4f56-bf15-1f7e619aef64%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/8461500f-03db-465c-bdca-7c9354b425ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
