Skip to content

Instantly share code, notes, and snippets.

@tshafeev
Created April 15, 2021 08:13
Show Gist options
  • Save tshafeev/44352fdb338818e39700919e60e1cb9e to your computer and use it in GitHub Desktop.
Save tshafeev/44352fdb338818e39700919e60e1cb9e to your computer and use it in GitHub Desktop.
#from https://honnamkuan.medium.com/show-all-credential-values-in-jenkins-86ecb19609d5
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