jenkinsci / jenkinsci/workflow-basic-steps-plugin
[JENKINS-28718] withTool
- Lenguaje dominante
- Java
- Estrellas
- 73
- Forks
- 129
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Línea de trabajo
Start by reading the referenced Maven.java code around line 502 and the workflow-basic-steps-plugin entry points for steps that establish environment variables. Implement the requested withTool('Maven 3.2.2') block behavior so the tool environment is available inside the block, then verify that the example no longer needs a manual withEnv PATH setup.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100