我正在尝试为我的 ant 应用程序编写一个 Jenkins 文件。我已经完成了 git checkout。现在我想使用管道而不是手动安装 ant 插件。
我收到错误: script.sh: ant: 未找到
pipeline{
agent{
node{
label 'pqr'
}
}
stages{
stage('Pull Source Code') {
steps{
checkout([
$class: 'GitSCM',
branches: scm.branches,
doGenerateSubmoduleConfigurations: false,
extensions: scm.extensions + [[$class: 'SubmoduleOption', disableSubmodules: false, recursiveSubmodules: true, reference: '', trackingSubmodules: false]],
submoduleCfg: [],
userRemoteConfigs: scm.userRemoteConfigs])
echo "${scm.branches}"
}
}
stage('Ant version') {
steps {
echo "Hello, Ant"
sh 'ant -version'
}
}
}
}