Skip to content
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

support: New API token system in Jenkins 2.129+ #47

Closed
jamesbeedy opened this issue Oct 3, 2018 · 7 comments
Closed

support: New API token system in Jenkins 2.129+ #47

jamesbeedy opened this issue Oct 3, 2018 · 7 comments

Comments

@jamesbeedy
Copy link
Contributor

Default api tokens are disabled since jenkins 2.1.29, see https://jenkins.io/blog/2018/07/02/new-api-token-system/.

The jenkins-charm needs a way to handle the new api token default behavior when initializing.
This seems to be the root cause of a bunch of the current issues.

@jamesbeedy
Copy link
Contributor Author

bump

@mthaddon
Copy link
Collaborator

mthaddon commented Feb 7, 2019

See https://github.com/mthaddon/jenkins-charm/tree/new-api-token - I still need to test this before proposing a PR

@jamesbeedy
Copy link
Contributor Author

Thanks @mthaddon !

I gave your code a build/deploy and am seeing this in the logs https://paste.ubuntu.com/p/ngdZmRxF8Z/

@mthaddon
Copy link
Collaborator

mthaddon commented Feb 7, 2019

I'm getting a slightly different error - https://pastebin.ubuntu.com/p/y3SSQYfN8t/ - in any case, plan to keep digging and will see what I can find.

@jamesbeedy
Copy link
Contributor Author

I wasn't using your new-api-token branch. I'm getting the same error as you now.

@faebd7
Copy link
Contributor

faebd7 commented Feb 18, 2019

These errors are because fresh builds of the charm get a version of python-jenkins that uses requests, whereas api.py expects the old urrlib-based code. Here's a PR to fix it: #50

Tom's branch above needs a light rebase for this change, which I've done and pushed to https://github.com/jetpackdanger/jenkins-charm/tree/new-api-token-2

A charm built from the second branch above can now successfully deploy Jenkins 2.164.

@mthaddon
Copy link
Collaborator

This is now fixed as of cs:jenkins-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants