fwiw, I added some logging to AbstractTask.setEnvironment to print out the 'root' variable (buildWorkspace.getRoot()), which is checked for the existence of a '@' character, and then the 'name' (buildWorkspace.getName)) variable, on which an attempted split on '@' is done, which fails, resulting in the array index error when attempting to get the second part. In this instance, 'dynconfig' is the pipeline job, and 'tivoPipeline' is the global library name.
Loading library tivoPipeline@now setEnv root = /home/jenkins/workspace/dynconfig@libs/tivoPipeline setEnv name = tivoPipeline java.lang.ArrayIndexOutOfBoundsException: 1 at org.jenkinsci.plugins.p4.tasks.AbstractTask.setEnvironment(AbstractTask.java:110)
As you can see, the root has a '@' in a parent directory for the pipeline job, but the last component of the directory does not have a '@', as it is just the library name. |