-
Bug
-
Resolution: Unresolved
-
Minor
My pipeline definitions include methods from Groovy script files. They are loaded like so:
lib = load('ci/lib.groovy')
The problem with this is that when I click the "Restart Build" button from BlueOcean on a job that uses this method it fails to load the Groovy scripts, which results in failures like so:
groovy.lang.MissingPropertyException: No such property: lib for class: WorkflowScript
{\{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)}}
{\{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)}}
{\{ at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:290)}}
{\{ at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)}}
{\{ at }}
...
The same does not happen when I use the "Replay" button from normal Jenkins UI.
Oh I see, so the "Prep" stage that I load() the library in isn't actually called:
Stage "Prep" skipped due to this build restarting at stage "Build"
Which means that this might not be a bug, it might be a feature request, to add a "Replay" button to the BlueOcean UI, but I'm not sure if this is intended behaviour yet.