-
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.
[JENKINS-54034] "Restart Build" button in BlueOcean causes build to fail when groovy load() method is used
Description |
Original:
My pipeline definitions include methods from Groovy script files. They are loaded like so: {color:#FF0000}{{lib = load('ci/lib.groovy')}}{color} 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. |
New:
My pipeline definitions include methods from Groovy script files. They are loaded like so: {color:#ff0000}{{lib = load('ci/lib.groovy')}}{color} 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: {color:#FF0000}{{groovy.lang.MissingPropertyException: No such property: lib for class: WorkflowScript}}{color} {color:#FF0000}{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)}}{color} {color:#FF0000}{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)}}{color} {color:#FF0000}{{ at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:290)}}{color} {color:#FF0000}{{ at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)}}{color} {color:#FF0000}{{ at }}{color} {color:#FF0000}{{...}}{color} The same does not happen when I use the "Replay" button from normal Jenkins UI. |
Description |
Original:
My pipeline definitions include methods from Groovy script files. They are loaded like so: {color:#ff0000}{{lib = load('ci/lib.groovy')}}{color} 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: {color:#FF0000}{{groovy.lang.MissingPropertyException: No such property: lib for class: WorkflowScript}}{color} {color:#FF0000}{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)}}{color} {color:#FF0000}{{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)}}{color} {color:#FF0000}{{ at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:290)}}{color} {color:#FF0000}{{ at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)}}{color} {color:#FF0000}{{ at }}{color} {color:#FF0000}{{...}}{color} The same does not happen when I use the "Replay" button from normal Jenkins UI. |
New:
My pipeline definitions include methods from Groovy script files. They are loaded like so: {color:#ff0000}{{lib = load('ci/lib.groovy')}}{color} 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: {color:#ff0000}{{groovy.lang.MissingPropertyException: No such property: lib for class: WorkflowScript}}{color} {color:#ff0000}{\{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)}}{color} {color:#ff0000}{\{ at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getProperty(ScriptBytecodeAdapter.java:458)}}{color} {color:#ff0000}{\{ at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:290)}}{color} {color:#ff0000}{\{ at org.kohsuke.groovy.sandbox.GroovyInterceptor.onGetProperty(GroovyInterceptor.java:68)}}{color} {color:#ff0000}{\{ at }}{color} {color:#ff0000}{{...}}{color} The same does not happen when I use the "Replay" button from normal Jenkins UI. |