这是我的多分支管道项目的Jenkinsfile:
pipeline {
agent any
stages {
stage('MASTER build') {
when {
branch 'master'
}
steps {
sh 'mvn -P x clean deploy'
}
}
stage('BRANCH build') {
when {
not { branch 'master' }
}
steps {
sh 'mvn -P x clean package'
}
}
}
post {
failure {
emailext "${EMAIL_TEMPLATE}"
}
}
}
当我在Jenkis中构建项目时,发生以下错误:
WorkflowScript: 26: Step does not take a single required parameter - use named parameters instead @ line 26, column 13.
emailext "${EMAIL_TEMPLATE}"
为什么我不能使用包含所有 emailext 定义的 EMAIL_TEMPLATE 全局变量?