Issue Type: New Feature New Feature
Assignee: Jesse Glick
Components: workflow-plugin
Created: 17/Dec/14 4:32 PM
Description:

Using

env.PATH="${tool 'Maven'}/bin:${env.PATH}"

works fine if you are only using only slave, or even if you have several but are using them serially. But it would not work when running things in parallel on several slaves (with different installation locations).

For that case it would be better to write something like

node {
    env("PATH=${tool 'Maven'}/bin:${env.PATH}") {
        // ...
        sh 'mvn install'
        // ...
    }
}

where the block step would temporarily override one (or more?) environment variables, but only in that thread. (These would presumably not be exposed via the REST API.)

The workaround is to define the environment variable in each sh or similar step, or do without it (in this example by giving an absolute executable name).

Project: Jenkins
Priority: Major Major
Reporter: Jesse Glick
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to