-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change nightly call to support new API tokens #1206
Change nightly call to support new API tokens #1206
Conversation
Investing this a bit more seems like Jenkins API tokens works nicely without making a crumb API call first https://issues.jenkins.io/browse/JENKINS-22474. To use the GitHub tokens we will need to implement the support for it in release.py and testing tooling. My proposal is to create an osrfbuild API token first and implement the support a new PR to avoid overloading this PR. The other main question is: do we prefer to use an existing token from GitHub to authenticate into Jenkins with the osrfbuild or a Jenkins API Token. Pros and Cons:
|
After speaking with @nuclearsandwich, we agreed on using a manually generated Jenkins API Token. It is much better scoped for the task. I've added it and test in #1212 |
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
979c26d
to
c45b366
Compare
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Jose Luis Rivero <[email protected]>
5627c48
to
7e392cb
Compare
Cherry picking changes to #1201 manually. Closing this. |
Build on top of #1201.
1. Adapt the release.py to not use the jenkins.ini file
The PR prepares the new auth method to work with nightly generation. To call release.py with osrfbuild bot account this PR implements the
--auth
parameter that supportsuser:token
to be passes as argument to authenticate in our Jenkins. The token can potentially be a Jenkins API token or a GitHub Token. d7dcb2dThis has the side effect on the test code that we no longer need the
_RELEASEPY_TEST_CREDENTIALS
, removed in af2ecae.2. Change release-tools DSL to modify the nightly_scheduler code
Remove existing shared token injection and use credentials plugin in Jenkins to pass GITHUB_TOKEN. Use that with the
--auth
mechanism implemented in 1. 85ea8883. Test DSL to check that token is able to login in Jenkins and use the osrfbuild fork
Hijack part of #353 and add a test to check that that the token is able to login into Jenkins. 07a29cb. The new token should have the fine-grained permissions on osrfbuild/homebrew-simulation fork for "Contents".
The existing
GITHUB_TOKEN
for the osrfbuild user in Jenkins does not seem to work to authenticate into Jenkins. This links with the old PR #353 that probably needs to be resurrected first.Needs to merge solution to this in #1212 before