| |
@@ -1,3 +1,14 @@
|
| |
+ 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]])
|
| |
+ println json
|
| |
+
|
| |
+ withCredentials([string(credentialsId: credentials, variable: PAGURE_PUSH_SECRET)]) {
|
| |
+ sh "curl -X POST -d \'$json\' https://pagure.io/api/0/ci/jenkins/$repo/${env.PAGURE_PUSH_SECRET}/build-finished"
|
| |
+ }
|
| |
+ }
|
| |
+
|
| |
def onmyduffynode(script){
|
| |
ansiColor('xterm'){
|
| |
timestamps{
|
| |
@@ -48,7 +59,7 @@
|
| |
}
|
| |
|
| |
} catch (e) {
|
| |
- currentBuild.result = "FAILED"
|
| |
+ currentBuild.result = "FAILURE"
|
| |
throw e
|
| |
} finally {
|
| |
stage('Sync Artifacts'){
|
| |
@@ -59,6 +70,11 @@
|
| |
sh 'cico node done ${SSID}'
|
| |
}
|
| |
|
| |
+ stage('Notify PR'){
|
| |
+ res = currentBuild.currentResult
|
| |
+ notifyPagurePR("pagure", "Build " + res + "! ", res, currentBuild.absoluteUrl)
|
| |
+ }
|
| |
+
|
| |
stage('Archive Artifacts'){
|
| |
archiveArtifacts artifacts: 'pagure/*.out'
|
| |
}
|
| |
I need the push secret from pagure-ci added to jenkins before we merge this, but here's a first cut.