我有一个带有HTML Publisher Plugin的詹金斯,我可以在每个版本都具有相同名称的情况下发送报告,但是我希望在每天生成带有报告名称的报告名称时选择发送报告,是有办法做到这些吗? 例-Htmal_report_15.04.2019 附加picture现在的样子
答案 0 :(得分:0)
这就是我所拥有的:
always {
echo 'I have finished'
archiveArtifacts 'PTs.html'
publishHTML (target: [
allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll: true,
reportDir: 'target/surefire-reports/',
reportFiles: 'index.html',
reportName: "TestNG Report"
])
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: '.', reportFiles: 'PTs.html', reportName: 'ExtentReport', reportTitles: ''])
emailext attachLog: true, attachmentsPattern: '*.html', body: 'Smoke Test.\n\nPlease see attachment for Report and build Logs', subject: 'DO NOT REPLY: JENKINS Build Server Notification [${BUILD_STATUS}]${JOB_NAME} Build #${BUILD_NUMBER}', to: 'addemailhere'
//deleteDir()
}
您将需要对所有html文件使用* .html