Either the syntax checker isn't smart enough, or the variables aren't 
available like that until you get down into the stages. I am suspecting the 
former, but just a guess.  

This syntax should work fine, though: 

SCRIPTS_PATH = "${env.WORKSPACE}/tools/Jenkins/PythonScripts"



On Thursday, September 21, 2017 at 9:48:43 AM UTC-6, David Aldrich wrote:
>
> Hi
>
>  
>
> My Jenkinsfile contains:
>
>  
>
>     environment {
>
>        SCRIPTS_PATH="${WORKSPACE}/Tools/Jenkins/PythonScripts"
>
>     }
>
>  
>
> When the script runs I get exception:
>
>  
>
> groovy.lang.MissingPropertyException: No such property: WORKSPACE for 
> class: groovy.lang.Binding
>
>         at groovy.lang.Binding.getVariable(Binding.java:63)
>
>  
>
> How should I correct the syntax?
>
>  
>
> Best regards
>
>  
>
> David
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/482db132-c078-4815-ada3-e98b8b79404b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to