更新时间:2023-12-05 15:13:40
您像使用maven一样调用ant(请参阅示例 https://jenkins.io/doc/pipeline/jenkinsfile/ ):
You invoke ant just like you do it with maven (take a look at examples https://jenkins.io/doc/pipeline/jenkinsfile/):
node ('linux'){
stage 'Build and Test'
env.PATH = "${tool 'Ant'}/bin:${env.PATH}"
checkout scm
sh 'ant build'
}
任务本身应该配置在 build.xml
中。
The tasks themselves should be configured in the build.xml
.