From 3defb1da4812dc554cbd20f8c990d54af8350ee6 Mon Sep 17 00:00:00 2001 From: Matheus Macedo Date: Mon, 25 Apr 2022 08:41:18 -0300 Subject: [PATCH 1/2] Adding notifications --- Jenkinsfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7060997..b1ae1d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,4 +14,13 @@ pipeline { } } } + post { + unsuccessful { + httpRequest( + httpMode: 'POST', + contentType: 'APPLICATION_JSON', + requestBody: "{\"attachments\": [{ \"color\" : \"#cf0000\", \"text\" : \"Environment $text deploument failed\", \"pretext\" : \"$BUILD_URL\" }]}", + url: "$response_url") + } + } } -- GitLab From 4fd54d0df38012ea303dd192e0c275c75653f425 Mon Sep 17 00:00:00 2001 From: Matheus Pereira Macedo De Sousa Date: Mon, 25 Apr 2022 13:43:08 +0200 Subject: [PATCH 2/2] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index b1ae1d6..3b0b271 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,7 +20,7 @@ pipeline { httpMode: 'POST', contentType: 'APPLICATION_JSON', requestBody: "{\"attachments\": [{ \"color\" : \"#cf0000\", \"text\" : \"Environment $text deploument failed\", \"pretext\" : \"$BUILD_URL\" }]}", - url: "$response_url") + url: "https://mattermost.web.cern.ch/hooks/kbdustfxdjyg3b88d96k3xwyoe") } } } -- GitLab