This commit is contained in:
Firas Sawan 2020-03-09 21:46:05 -04:00
parent 35f8656f0e
commit 5093392716

12
Jenkinsfile vendored
View file

@ -1,7 +1,6 @@
String buildUrl = "${BUILD_URL}"
String gitStatusPostUrl = "https://<Github Personal Access Token>:x-oauth-basic@api.github.com/repos/<owner>/<repo>/statuses/${gitHash}"
pipeline { pipeline {
String buildUrl = "${BUILD_URL}"
String gitStatusPostUrl = "https://<Github Personal Access Token>:x-oauth-basic@api.github.com/repos/<owner>/<repo>/statuses/${gitHash}"
agent any agent any
stages { stages {
stage('Build') { stage('Build') {
@ -41,8 +40,7 @@ pipeline {
} }
} }
sh """
curl -X POST -H "application/json" -d '{"state":"success", "target_url":"${buildUrl}", "description":"Build Success", "context":"build/job"}' "${gitStatusPostUrl}"
"""
} }
sh """
curl -X POST -H "application/json" -d '{"state":"success", "target_url":"${buildUrl}", "description":"Build Success", "context":"build/job"}' "${gitStatusPostUrl}"
"""