[英]Groovy error in Jenkins declarative pipeline
我已經在Docker上安裝了Jenkins,並從SCM創建了聲明性管道。 Jenkinsfile放在Github上,並具有以下代碼:
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}
現在,每當我構建Jenkins工作時,都會出現以下錯誤
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] End of Pipeline
groovy.lang.MissingPropertyException: No such property: pipeline for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
Finished: FAILURE
當我將代碼從Jenkinsfile放置在Github上直接到Jenkins時,便可以成功構建。 不知道是什么問題,盡管同一件事早先已經起作用(我已經在Docker上重新安裝了Jenkins)
將腳本安全性插件升級到v1.46(最新)后,它對我有用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.