title: Accessing environment variables in Extended Choice Parameter
body: <p>I want to write a Groovy script for Extended Choice Parameter that would use access WORKSPACE variable. When I try:</p>
  
  <pre><code>List&lt;String&gt; artifacts = new ArrayList&lt;String&gt;()
  artifacts.add(env.WORKSPACE)
  asdf = env.WORKSPACE
  println asdf
  return artifacts
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>No such property: env for class: _1775dc8d170bd01576ff2b650850017e
  groovy.lang.MissingPropertyException: No such property: env for class: _1775dc8d170bd01576ff2b650850017e
  at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
  at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
  at _1775dc8d170bd01576ff2b650850017e.run(_1775dc8d170bd01576ff2b650850017e:2)
  at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585)
  at com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition.executeGroovyScript(ExtendedChoiceParameterDefinition.java:727)
  at com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition.executeGroovyScriptAndProcessGroovyValue(ExtendedChoiceParameterDefinition.java:709)
  at com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition.computeValue(ExtendedChoiceParameterDefinition.java:676)
  at com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition.computeEffectiveValue(ExtendedChoiceParameterDefinition.java:855)
  at com.cwctravel.hudson.plugins.extended_choice_parameter.ExtendedChoiceParameterDefinition.getParameterDefinitionInfo(ExtendedChoiceParameterDefinition.java:1451)
  at jdk.internal.reflect.GeneratedMethodAccessor701.invoke(Unknown Source)
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Also, will I be able to call a python script from this plugin, that would provide me list of parameters that I wish to use?</p>