ContributionsMost RecentMost LikesSolutionsenvironment variable from Jenkins We are using Soapui plugin with Jenkins and maven. I have a requirement where we need to read the environment variables from Jenkins. In pom.xml we have defined <systemPropertyVariables> <buildUrl>${BUILD_URL}</buildUrl> </systemPropertyVariables> And in soapui groovy script - String JENKINS_BUILD_URL = System.getProperty("buildUrl"); log.info "Jenkins Build URL is "+JENKINS_BUILD_URL+"" But the value is coming as null. Reading Env variable from Jenkins through groovy script in soapui ERROR [SoapUI] An error occurred [startup failed: Script1.groovy: 4: unable to resolve class ParametersAction @ line 4, column 53. ?.actions.find{ it instanceof Parameters ^ org.codehaus.groovy.syntax.SyntaxException: unable to resolve class ParametersAction @ line 4, column 53. The script I am running through soapui is given below. I need to read some variables from Jenkins for reporting. import hudson.model.* // get current thread / Executor def thr = Thread.currentThread() // get current build def build = thr?.executable // get parameters def parameters = build?.actions.find{ it instanceof ParametersAction }?.parameters parameters.each { println "parameter ${it.name}:" println it.dump() println "-" * 80 } // ... or if you want the parameter by name ... def hardcoded_param = "BUILD_USER_LAST_NAME" def resolver = build.buildVariableResolverdef hardcoded_param_value = resolver.resolve(hardcoded_param)println "param ${hardcoded_param} value : ${hardcoded_param_value}"