Last active
April 13, 2018 20:27
-
-
Save scoheb/c960a534b592552d96265f03af52f4bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hudson.model.User; | |
import jenkins.security.ApiTokenProperty; | |
import hudson.util.Secret; | |
// Get the actual token | |
u = User.get("system_serviceaccount_rhproduct_jenkins-admin") | |
tokprop = u.getProperty(ApiTokenProperty.class) | |
actual_token = tokprop.getApiTokenInsecure() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment