Add XMPP notification post-build step

This commit is contained in:
2026-02-28 21:43:42 +00:00
parent fb1b9739e1
commit 6122c48377

20
Jenkinsfile vendored
View File

@@ -9,4 +9,24 @@ pipeline {
}
}
}
post {
always {
script {
def status = currentBuild.currentResult
def payload = groovy.json.JsonOutput.toJson([
name: env.JOB_NAME,
build: [
number: env.BUILD_NUMBER as int,
status: status,
phase: "COMPLETED",
duration: currentBuild.duration,
full_url: env.BUILD_URL
]
])
sh """curl -s -X POST http://127.0.0.1:9090/jenkins \
-H 'Content-Type: application/json' \
-d '${payload}'"""
}
}
}
}