jenkinsci / jenkinsci/workflow-basic-steps-plugin
[JENKINS-28718] withTool
Aperta
component:workflow-basic-steps-plugin
imported-jira-issue
priority:major
resolution:unresolved
- Lingua principale
- Java
- Stelle
- 73
- Fork
- 129
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Rather than
withEnv(["PATH=${tool 'Maven 3.2.2'}/bin:${env.PATH}"]) {sh 'mvn package'}
you should be able to say
withTool('Maven 3.2.2') {sh 'mvn package'}
where this code builds the environment variables within the block.
---
Originally reported by
jglick, imported from: withTool
jglick
Raw content of original issue
Rather than
withEnv(["PATH=${tool 'Maven 3.2.2'}/bin:${env.PATH}"]) {sh 'mvn package'}you should be able to say
withTool('Maven 3.2.2') {sh 'mvn package'}where this code builds the environment variables within the block.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.