栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

通过在管道中发送邮件(以前称为工作流),jenkins通知错误发生在不同的步骤中

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

通过在管道中发送邮件(以前称为工作流),jenkins通知错误发生在不同的步骤中

我做了什么以便在邮件中包含有关失败的有用信息:

try {    stage 'checkout cvs'    node('master') {            }    stage 'compile'    node('master') {            }    stage 'test unit'    node('master') {            }    stage 'package'    node('master') {            }    stage 'nexus publish'    node('master') {            }    stage 'Deploy to App Server'    node('master') {             }} catch(e) {    String error = "${e}";    // Make the string with job info, example:    // ${env.JOB_NAME}    // ${env.BUILD_NUMBER}     // ${env.BUILD_URL}    // and other variables in the pre    mail bcc: '',         cc: '',         charset: 'UTF-8',         from: '',         mimeType: 'text/html',         replyTo: '',         subject: "ERROR CI: Project name -> ${env.JOB_NAME}",         to: "${mails_to_notify}",         body: "<b>${pivote}</b><br>nnMensaje de error: ${error}nn<br>Projecto: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL de build: ${env.BUILD_URL}";    error "${error}"}


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/608898.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号