在变量中获取詹金斯每个阶段的结果

我有这样的管道:

stages{
 stage ('1') {
  steps{do something}
}

 stage ('2') {
 steps {do something}
}

我想做的是在环境变量中获取每个阶段的结果,例如在

stage ('1')

        COMPILE_STATUS= <some variable that contains the result of this stage>
        stage ('2')
        TEST_STATUS = <some variable that contains the result of this stage>

最后,我想自定义我的电子邮件以发送每个阶段的状态

amife 回答:在变量中获取詹金斯每个阶段的结果

目前,我不认为有任何插件可以保存舞台结果。我建议您在每个阶段添加try catch操作并相应地发布结果。让我知道这是否有效。

本文链接:https://www.f2er.com/3103868.html

大家都在问