Groovy DSL的失败通知的松弛通知无法正常工作

时间:2020-10-11 08:26:59

标签: jenkins groovy jenkins-plugins jenkins-groovy

要求

每次构建失败后,我们都应该收到松弛通知

发生了什么

使用以下groovy脚本导入作业后,构建失败后我们不会收到松弛通知

奇怪的部分

在已构建的作业中,如果我取消单击并单击notifyEveryFailure并单击“保存”(这实际上意味着我没有更改作业中的任何内容),它将开始工作。

    slackNotifier {
            notifyBackToNormal(false)
            notifySuccess(false)
            notifyRepeatedFailure(false)
            startNotification(false)
            notifyAborted(false)
            notifyFailure(false)
            notifyNotBuilt(false)
            notifyUnstable(false)
            notifyEveryFailure(true)
            notifyNotBuilt(false)
            notifyUnstable(false)
            tokenCredentialId("myid")
            baseUrl("hook-URL")
        }

0 个答案:

没有答案