FreeStyleProject p = (FreeStyleProject) build.getProject();
ORIGIN_BUILDER = (CommandInterpreter) builder;
NEW_BUILDER = new Shell("echo hello");
p.getBuildersList().remove(ORIGIN_BUILDER);
p.getBuildersList().add(NEW_BUILDER);
p.save();
p.doReload();I am developing a new plugin where it need to modify the content of 'Execute Shell'. Above is my code. The above code 'seems' work fine because I see the content of 'Execute Shell' has been changed as expected. But the problem I met is although the content has been updated, jenkins still execute the old content from the temp 'sh' file(see as below). [test] $ sh -xe C:\Users\HZCHEN~1\AppData\Local\Temp\hudson1593723515622610306.sh Does anyone know why Jenkins still execute the old commands from the temp file? How to tell Jenkins to execute my new 'Execute Shell'? -- 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/65a68f26-8f7d-4051-ad5f-7b128070c5bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
