jenkinsci / jenkinsci/workflow-basic-steps-plugin
[JENKINS-48733] withEnv not setting PATH environment variable
- Lingua principale
- Java
- Stelle
- 73
- Fork
- 129
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
With a pipeline definition similar to
```
pipeline {
agent {
docker {
image 'registry/org/buildagent'
}
}
tools {
jdk 'jdk-1.7.0_131'
maven 'maven-3.5.0'
}
stages {
stage ('Build') {
steps {
sh('mvn deploy')
}
}
}
}
```
The following message is generated
```
+ mvn deploy
/workspace/project@tmp/durable-d723cc26/script.sh: line 2: mvn: command not found
```
This exact script works with Jenkins 2.73.1 and the Pipeline Model API 1.2.5 plugin
---
Originally reported by bkeyser_dgi, imported from: withEnv not setting PATH environment variable
Raw content of original issue
With a pipeline definition similar to
pipeline {
agent {
docker {
image 'registry/org/buildagent'
}
}tools {
jdk 'jdk-1.7.0_131'
maven 'maven-3.5.0'
}stages {
stage ('Build') {
steps {
sh('mvn deploy')
}
}
}
}The following message is generated
+ mvn deploy
/workspace/project@tmp/durable-d723cc26/script.sh: line 2: mvn: command not foundThis exact script works with Jenkins 2.73.1 and the Pipeline Model API 1.2.5 plugin
environment
```
Jenkins 2.89.2
Pipeline Model API 1.2.5
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo la pipeline dichiarativa fornita con Jenkins 2.89.2, l'agente Docker e gli strumenti JDK e Maven elencati. Esamina la gestione dell'ambiente di workflow-basic-steps-plugin e confronta il risultato con la configurazione Jenkins 2.73.1 riportata; il lavoro è completo quando la pipeline riesce a risolvere ed eseguire `mvn deploy` come mostrato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- ci-cd
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100