GitHub app blog - #2988
Conversation
|
build failed for:
|
Co-Authored-By: Jesse Glick <jglick@cloudbees.com>
This comment has been minimized.
This comment has been minimized.
|
I’ll check off master later on, We setup about 5 today off the incremental version from the PR |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hah, I just tested it end 2 end off your PR and it worked fine for me. |
Co-Authored-By: Mark Waite <mark.earl.waite@gmail.com>
|
@timja I've released 2.7.0-beta1 with this feature. I'd like to wait to release this blog post until the GA release (which I plan to do within the week), but I'm open to posting it for the beta. |
i'm open to either, Oleg just posted in advocacy and outreach gitter about possibly publishing it tomorrow, we could discuss there? |
|
@timja |
bitwiseman
left a comment
There was a problem hiding this comment.
Mostly formatting and wording.
One section that could use a bit more information.
| author: timja | ||
| --- | ||
|
|
||
| I'm excited to announce support for authenticating as a GitHub app in Jenkins. |
There was a problem hiding this comment.
"GitHup Apps" is the name of the product. A "GitHub app" is an individual app. Okay.
https://developer.github.com/apps/
| == How do I get an API token in my pipeline? | ||
|
|
||
| You can access the Bearer token for the GitHub API by just loading a 'Username/Password' credential as usual, | ||
| the plugin will handle authenticating with GitHub in the background: | ||
|
|
||
| [source, groovy] | ||
| ---- | ||
|
|
||
| pipeline { | ||
| agent any | ||
|
|
||
| stages{ | ||
| stage('Check run') { | ||
| steps { | ||
| withCredentials([usernamePassword(credentialsId: 'githubapp-jenkins', | ||
| usernameVariable: 'GITHUB_APP', | ||
| passwordVariable: 'GITHUB_JWT_TOKEN')]) { | ||
| sh ''' | ||
| curl -H "Content-Type: application/json" \ | ||
| -H "Accept: application/vnd.github.antiope-preview+json" \ | ||
| -H "authorization: Bearer ${GITHUB_JWT_TOKEN}" \ | ||
| -d '{ "name": "check_run", \ | ||
| "head_sha": "'${GIT_COMMIT}'", \ | ||
| "status": "in_progress", \ | ||
| "external_id": "42", \ | ||
| "started_at": "2020-03-05T11:14:52Z", \ | ||
| "output": { "title": "Check run from Jenkins!", \ | ||
| "summary": "This is a check run which has been generated from Jenkins as GitHub App", \ | ||
| "text": "...and that is awesome"}}' https://api.github.com/repos/<org>/<repo>/check-runs | ||
| ''' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| ---- |
There was a problem hiding this comment.
@timja
It would be helpful if we talked a bit about why users would want to do this and some of the security considerations in this are. Also, we should definitely mention that this token is only valid for one hour. For long running jobs if the user gets the password this way, they should use it right away. This is also a security improvement - tokens visible in the pipeline are not long lived.
Co-Authored-By: Liam Newman <bitwiseman@gmail.com>
|
I've added more info, thanks for the review @bitwiseman, It's updated for publishing tomorrow, feel free to push any commits you feel improve it as well |
|
(this is no longer on hold if anyone wants to remove the label) |
oleg-nenashev
left a comment
There was a problem hiding this comment.
Better late than never, a bunch of minor comments and improvement suggestions
Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>
|
shall we wait till next week now? I think we missed the best time, could just ship with GA at this point? |
|
I am ready to ship in 10 minutes or so if you prefer to do it rather early than later |
|
The time is good for US, and we can do reposts tomorrow for APAC/Europe |
|
sure let's go for it |
|
We will need to move images out of the root later. I believe we should move them anyway to the documentation sections later, so I do not mind the image in |
|
Oops |


Draft until the plugin is actually released,
PR was: jenkinsci/github-branch-source-plugin#269
cc @bitwiseman @oleg-nenashev @ojacques