[ 
https://issues.jenkins-ci.org/browse/JENKINS-13396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161443#comment-161443
 ] 

gbois edited comment on JENKINS-13396 at 4/10/12 9:06 PM:
----------------------------------------------------------

In the 'prepare environment' section, WORKSPACE variable is not available 
because you are running before a SCM checkout.
The SCM checkout is supposed to create the workspace.
For your use case, you have to put your Properties content in 'Build 
Environment'>Inject environment variables to the build process section.

In the next releases, I'll add more comments in help message about this subject.
                
      was (Author: gbois):
    In the 'prepare environment' section, WORKSPACE is not available because 
you are running before a SCM checkout.
The SCM checkout is supposed to create the workspace.
For your use case, you have to put your Properties content in 'Build 
Environment'>Inject environment variables to the build process section.

In the next releases, I'll add more comments in help message about this subject.
                  
> EnvInject plug-in does not read ${WORKSPACE} property
> -----------------------------------------------------
>
>                 Key: JENKINS-13396
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13396
>             Project: Jenkins
>          Issue Type: Bug
>          Components: envinject
>    Affects Versions: current
>         Environment: Jenkins v1.458 on Linux (CentOS v5.6)
> EnvInject v1.45
>            Reporter: John Bayley
>            Assignee: gbois
>
> In the EnvInject plug-in configuration for a job, both the "Keep Jenkins 
> Environment Variables" and "Keep Jenkins Build Variables" check-boxes are 
> selected.
> The "Properties Content" section sets the following property:
>   M2_REPO = ${WORKSPACE}/.repository
> However, when a build runs, the log reports:
>   [EnvInject] - Loading node environment variables.
>   [EnvInject] - Preparing an environment for the build.
>   [EnvInject] - Keep Jenkins system variables.
>   [EnvInject] - Keep Jenkins build variables.
>   [EnvInject] - Injecting as environment variables the properties content 
>   M2_REPO=${WORKSPACE}/.repository
>   [EnvInject] - Variables injected successfully.
>   [EnvInject] - Unset unresolved 'M2_REPO' variable.
> and the build operates as if the environment variable is unset. The 
> ${WORKSPACE} property appears to be ignored.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to