How to debug "Problems arise when env vars is introduced as an assembly wrapper: null"

I use Groovy to insert variables into the build process using the EnvInject Plugin plugin:

https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin

My script is saved in the "Groovy rated script" text area.

If the script works, everything is fine. But if some error occurs, I always get the same error message:

[EnvInject] - [ERROR] - [EnvInject] - [ERROR] - Problems occurs on injecting env vars as a build wrap: null 

Is there a way to get the actual exception or even exception message?

+6
source share
2 answers

Another solution I found is to turn your code into

 try { // CODE HERE } catch (Throwable t) { println(t) throw t; } 
+5
source

If you put the script in the section "Preparing the environment to run", and not down at the level "Build environment" in the "Injection environment variable in the build process", this will give you an exception error and stack trace.

+4
source

All Articles