From ec38e49d2c872c6555cf023625ce6bbebffea37e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 20 2018 09:12:13 +0000 Subject: Fix notifying about finished builds and notify about started ones Signed-off-by: Pierre-Yves Chibon --- diff --git a/.cico.pipeline b/.cico.pipeline index dd0b04d..f064e4b 100644 --- a/.cico.pipeline +++ b/.cico.pipeline @@ -1,7 +1,7 @@ import groovy.json.JsonOutput -def notifyPagurePR(repo, msg, status, credentials = 'pagure-auth'){ - def json = JsonOutput.toJson([name: 'pagure', url: env.JOB_NAME, build: [full_url: currentBuild.absoluteUrl, status: status, number: currentBuild.number]]) +def notifyPagurePR(repo, msg, status, phase, credentials = 'pagure-auth'){ + def json = JsonOutput.toJson([name: 'pagure', url: env.JOB_NAME, build: [full_url: currentBuild.absoluteUrl, status: status, number: currentBuild.number, phase: phase]]) println json withCredentials([string(credentialsId: credentials, variable: "PAGURE_PUSH_SECRET")]) { @@ -52,6 +52,10 @@ node('pagure') { onmyduffynode 'yum -y install epel-release git' } + stage('Notify PR'){ + notifyPagurePR("pagure", "Tests running ", "BUILDING", "STARTED") + } + stage('Clone Test Suite') { onmyduffynode "git clone --single-branch --depth 1 https://pagure.io/pagure.git" } @@ -76,7 +80,7 @@ node('pagure') { stage('Notify PR'){ res = currentBuild.currentResult - notifyPagurePR("pagure", "Build " + res + "! ", res) + notifyPagurePR("pagure", "Build " + res + "! ", res, "FINALIZED") } stage('Archive Artifacts'){