В моем Jenkinsfile есть следующий конвейер:
pipeline {
agent any
stages {
stage("Compile") {
steps {
sh "./mvnw clean package"
}
}
stage("Unit test") {
steps {
sh "./mvnw test"
}
}
}
}
Сборка не удалась и журнал выглядит следующим образом:
...
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Compile)
[Pipeline] sh
[calculator] Running shell script
+ ./mvnw clean package
/var/lib/jenkins/workspace/calculator@tmp/durable-ed9b8653/script.sh: 2: /var/lib/jenkins/workspace/calculator@tmp/durable-ed9b8653/script.sh: ./mvnw: Permission denied
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Unit test)
Stage "Unit test" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 126
Finished: FAILURE
Я установил разрешения mvnw на 777, но не могу решить проблему.
Может кто-нибудь сказать мне решение?