-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor
-
Component/s: workflow-cps-plugin
-
Environment:Jenkins ver. 2.7.21.1
Pipeline 2.4
When an AbortException is raised in a pipeline build, the console only display the String message of the AbortException (e.g. "ERROR: 'copyRemoteArtifacts' step could not complete") and does not display the stack trace that would help greatly to understand the cause.
I had to wrap my failing step in "try {}catch(){}" to discover the root cause.
I got a generic message that does not explain the cause :
ERROR: 'copyRemoteArtifacts' step could not complete
When the root exception displayed by "try {}catch(){}" was clear:
hudson.AbortException: 'copyRemoteArtifacts' step could not complete ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyStepExecution.abort(RemoteArtifactCopyStepExecution.java:159) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyStepExecution.run(RemoteArtifactCopyStepExecution.java:108) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyStepExecution.run(RemoteArtifactCopyStepExecution.java:34) ββat org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52) ββat hudson.security.ACL.impersonate(ACL.java:213) ββat org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49) ββat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ββat java.util.concurrent.FutureTask.run(FutureTask.java:266) ββat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ββat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ββat java.lang.Thread.run(Thread.java:745) Caused by: java.util.concurrent.ExecutionException: java.io.IOException: Source job does not exist or you do not have permission to see the source job ββat com.cloudbees.opscenter.context.rpc.RPCFuture.get(RPCFuture.java:272) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyCallable.invoke(RemoteArtifactCopyCallable.java:237) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyCallable.invoke(RemoteArtifactCopyCallable.java:174) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyStepExecution.run(RemoteArtifactCopyStepExecution.java:103) ββ... 9 more Caused by: java.io.IOException: Source job does not exist or you do not have permission to see the source job ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyCallable.call(RemoteArtifactCopyCallable.java:447) ββat com.cloudbees.opscenter.artifacts.RemoteArtifactCopyCallable.call(RemoteArtifactCopyCallable.java:59) ββat com.cloudbees.opscenter.context.remote.RemoteAuthentication.impersonate(RemoteAuthentication.java:88) ββat com.cloudbees.opscenter.context.rpc.RPCRequest$1.call(RPCRequest.java:217) ββat hudson.remoting.LocalChannel$1.call(LocalChannel.java:52) ββat jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) ββ... 4 more