(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| void setBuildStatus(String message, String context, String state) { | |
| // add a Github access token as a global 'secret text' credential on Jenkins with the id 'github-commit-status-token' | |
| withCredentials([string(credentialsId: 'github-commit-status-token', variable: 'TOKEN')]) { | |
| // 'set -x' for debugging. Don't worry the access token won't be actually logged | |
| // Also, the sh command actually executed is not properly logged, it will be further escaped when written to the log | |
| sh """ | |
| set -x | |
| curl \"https://api.github.com/repos/org/repo/statuses/$GIT_COMMIT?access_token=$TOKEN\" \ | |
| -H \"Content-Type: application/json\" \ | |
| -X POST \ |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.