我现在附上我的python脚本的控制台输出,用jenkins发送邮件有没有什么方法可以使用jenkins将测试结果 Jmeter 板直接发送到电子邮件?任何帮助都将不胜感激,谢谢
irtuqstp1#
是你的脚本生成任何HTML报告,如果是,你可以发布在电子邮件正文的HTML。Display HTML page inside mail body with Email-ext plugin in Jenkins
wixjitnu2#
通过将email-ext插件与Jenkins集成,将其添加到您的管道中。
post { fixed { emailext body: 'Check console output at $BUILD_URL to view the results. \n\n ${CHANGES} \n\n -------------------------------------------------- \n${BUILD_LOG, maxLines=100, escapeHtml=false}', to: "${EMAIL_TO}", subject: 'FIXED: $PROJECT_NAME - #$BUILD_NUMBER' } failure { emailext body: 'Check console output at $BUILD_URL to view the results. \n\n ${CHANGES} \n\n -------------------------------------------------- \n${BUILD_LOG, maxLines=100, escapeHtml=false}', to: "${EMAIL_TO}", subject: 'FAILED: $PROJECT_NAME - #$BUILD_NUMBER' } unstable { emailext body: 'Check console output at $BUILD_URL to view the results. \n\n ${CHANGES} \n\n -------------------------------------------------- \n${BUILD_LOG, maxLines=100, escapeHtml=false}', to: "${EMAIL_TO}", subject: 'UNSTABLE: $PROJECT_NAME - #$BUILD_NUMBER' } }
2条答案
按热度按时间irtuqstp1#
是你的脚本生成任何HTML报告,如果是,你可以发布在电子邮件正文的HTML。Display HTML page inside mail body with Email-ext plugin in Jenkins
wixjitnu2#
通过将email-ext插件与Jenkins集成,将其添加到您的管道中。