我正在使用Jenkins 2.x,通过Jenkinsfile
运行流水线。
我已经使用Jenkinsfile构建了一个作业,并希望调用Analysis Collector插件以便查看报告。
这是我的当前Jenkinsfile:
#!groovy
node {
stage 'Build '
echo "My branch is: ${env.BRANCH_NAME}"
sh 'cd gitlist-PHP && ./gradlew clean build dist'
stage 'Report'
step([$class: 'JUnitResultArchiver', testResults: 'gitlist-PHP/build/logs/junit.xml'])
step([$class: 'hudson.plugins.checkstyle.CheckStylePublisher', checkstyle: 'gitlist-PHP/build/logs/phpcs.xml'])
step([$class: 'hudson.plugins.dry.DryPublisher', CopyPasteDetector: 'gitlist-PHP/build/logs/phpcpd.xml'])
stage 'mail'
mail body: 'project build successful',
from: 'siregarpandu@gmail.com',
replyTo: 'xxxx@yyyy.com',
subject: 'project build successful',
to: 'siregarpandu@gmail.com'
}
我想从Jenkins调用Checkstyle、Junit和DRY插件。我应该如何在Jenkinsfile
中配置这些插件?这些插件支持流水线吗?