Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54034

"Restart Build" button in BlueOcean causes build to fail when groovy load() method is used

      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

            Unassigned Unassigned
            always_fail Always Fail
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: