我使用Jenkins 2.x和Jenkinsfile
来运行管道。如何在Jenkins管道中使用报告插件(PMD,PHPCPD,checkstyle,Jdepend ...)?
我已经使用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: '[email protected]',
replyTo: '[email protected]',
subject: 'project build successful',
to: '[email protected]'
}
我想要调用从詹金斯调用的Checkstyle,JUnit和干插件。如何在Jenkinsfile
中配置这些插件?这些插件是否支持管道?
请编辑你的问题,并修复你的造型。你的问题很难阅读。 – tisto