配置Jenkins参数
Jenkinsfile配置变量
#!groovy
String buildShell = "${env.buildShell}"
pipeline{
agent { node { label "master"}}
stages{
stage("mavenBuild"){
steps{
script{
try {
antHome = tool 'M2'
sh "${antHome}/bin/mvn ${buildshell} "
} catch(e){
println(e)
}
}
}
}
stage("antBuild"){
steps{
script{
try {
antHome = tool 'ant'
sh "${antHome}/bin/ant ${buildshell} "
} catch(e){
println(e)
}
}
}
}
stage("GradleBuild"){
steps{
script{
antHome = tool 'Gradle'
sh "${antHome}/bin/gradle ${buildshell} "
}
}
}
stage("npmBuild"){
steps{
script{
npmHome = tool 'npm'
sh "${npmHome}/bin/npm ${buildshell} "
}
}
}
}
}
构建
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论