我正在尝试为我的自动化工作之一创建Jenkins Pipeline。我创建了Jenkins文件。下面指定的代码:
pipeline {
agent any
def mvn_version = 'MavenTest'
withEnv( ["PATH+MAVEN=${tool mvn_version}/bin"] ) {
//sh "mvn clean package"
}
stages {
stage('Git checkout') { // for display purposes
steps {
git branch: "ReportTest", url: 'https://github.abc.com/vsing136/testWDM.git'
sh "mvn clean verify"
}
}
stage('Stage 1') {
steps {
echo 'Hello world!'
}
}
}
}
post {
always {
emailext body: "Build URL: ${BUILD_URL}",
subject: "$currentBuild.currentResult-$JOB_NAME",
to: 'vabc1@example.com'
}
}
下面指定了我的工作配置的屏幕截图:
我不确定自己在做什么错,但是此配置出现错误-
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 4: Tool type "maven" does not have an install of "Maven 3.3.9" configured - did you mean "Maven"? @ line 4, column 11.
maven 'Maven 3.3.9'
^
1 error
答案 0 :(得分:0)
以下代码对我有用:
BUILD_EXTERN_GLEW=OFF