为了打通环境变量构建状态 [英] To get build status through environment variable

查看:320
本文介绍了为了打通环境变量构建状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用持续集成詹金斯。
  对于我的构建目的,我使用Ant任务触发的电子邮件。我无法找到一个环境变量传递蚂蚁发送电子邮件生成状态(成功/失败/稳定)。
我想知道我如何能得到环境变量构建状态?..如果没有,什么是构建状态的替代方案?

I am using jenkins for continous integration. For my build purpose, i triggering email using Ant task. I am not able to find an environment variable to pass ant for sending email build status(success/failure/stable). i want to know how can i get environment variable for build status?..if not available, what is the alternative option for build status?

由于提前

Varghese表示

varghese

推荐答案

为什么要使用ANT从詹金斯发送电子邮件,当你有两个伟大的插件,做到了这一点?

Why use ANT to send emails from Jenkins when you have two great plugins that does just that?

默认的邮件通知是相当不错的,如果你想有更多的控制结果
我建议使用 电子邮件-EXT插件 这是非常COM prehensive。

The default mail notification is quite good, and if you would like to have more control
I suggest using the Email-ext plugin which is very comprehensive.

如果仍然希望使用Ant来发送邮件,通知,包括状态结果
你将不得不打破你的过程分为两步,结果
其中,第一部分运行构建,第二个运行Ant脚本状态报告。

If still wish to use ANT to sent your mail-notifications including the status
you will have to break your process into two steps,
where the first part runs the build and the second one runs the ANT script to report the status.

在这种情况下,你需要通过在参数构建从第一份工作触发第二个作业插件 - 搜索
看到这里我的答案:结果
触发其它配置和发送与詹金斯

In this case, you will need to trigger the second job from the first job via the Parameterized Build plugin -
see my answer here:
trigger other configuration and send current build status with Jenkins

这篇关于为了打通环境变量构建状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆