Last active
December 30, 2022 12:23
-
-
Save honnamkuan/ab750d387e4e2e3762907b98d408dcd0 to your computer and use it in GitHub Desktop.
List all Jenkins credentials
This file contains hidden or 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
| def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials( | |
| com.cloudbees.plugins.credentials.common.StandardCredentials.class, | |
| Jenkins.instance, | |
| null, | |
| null | |
| ); | |
| for (int i; i < creds.size(); i++) { | |
| println "\n========== Credential ${i+1} Start ==========" | |
| creds[i].properties.each { println it } | |
| println "========== Credential ${i+1} End ==========\n" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment