xetra11
xetra11

Reputation: 8835

Jenkins EnvInject Plugin does not resolve $WORKSPACE

I want to inject a new path variable to a folder which resides in my project workspace.

PATH=$PATH:$WORKSPACE/workspace-configuration/bin/sencha_cmd

That's how I defined it in Properties Content

[EnvInject] - Executing scripts and injecting environment variables after the SCM step. [EnvInject] - Injecting as environment variables the properties content PATH=/home/tomcat/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/java/latest/bin:$WORKSPACE/workspace-configuration/bin/sencha_cmd

As you can see the $WORKSPACE variable was not resolved

What am I doing wrong?

Upvotes: 0

Views: 1434

Answers (1)

xetra11
xetra11

Reputation: 8835

Prepare an environment for the run needs to be checked in General settings of the Jenkins Job

Upvotes: 1

Related Questions