This plugin allows pipeline and freestyle jobs to wrap arbitrary steps or builders. The plugin will then notify GitHub via a status message the result of the steps/builders
See the GitHub Readme for more info!
gitStatusWrapper makes your life easier!
stage('EZPZ Updates') {
steps {
gitStatusWrapper(credentialsId: 'github-token', gitHubContext: 'Status', description: 'Validating') {
sh "./do_stuff.sh"
}
}
}
Stop calling githubNotify 3+ times
stage('Annoying status updates') {
script {
try {
githubNotify(credentialsId: 'github-token', context: 'Status', description: 'Validating', status: 'PENDING')
sh "./do_stuff.sh"
githubNotify(credentialsId: 'github-token', context: 'Status', description: 'Validating', status: 'SUCCESS')
}
catch (Exception e) {
githubNotify(credentialsId: 'github-token', gitHubContext: 'Status', description: 'Validating', status: 'FAILURE')
}
}
}