Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Commit

Permalink
Add debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Boardwell committed Apr 18, 2020
1 parent d5f711d commit 846dad3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/JobDslGenUtil.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ class JobDslGenUtil {
def creds = jenkins.model.Jenkins.instanceOrNull?.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')
def ret = []
creds.each { provider ->
out.println "Checking credentials provider '$provider'"
out.println " Checking credentials provider '$provider'"
def cred = provider.credentials.findResult { it.id == credentialsId ? it : null }
if (cred?.class?.name == 'com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl')
out.println " Checking credentials provider 'UsernamePasswordCredentialsImpl'"
out.println " Lengths ${cred.password?.size()} : ${cred.username?.size()}"
ret = [ cred.password, cred.username ]
else if (cred?.class?.name == 'org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl') {
out.println " Checking credentials provider 'StringCredentialsImpl'"
out.println " Lengths ${cred.secret?.size()}"
ret = [ cred.secret ]
}
}
Expand Down

0 comments on commit 846dad3

Please sign in to comment.