Created
January 30, 2019 19:46
-
-
Save marcosborges/d9b1e45c2da6998bcafee02125ede0e0 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 jenkins.model.Jenkins; | |
import com.cloudbees.plugins.credentials.* | |
import org.jenkinsci.plugins.plaincredentials.* | |
import org.jenkinsci.plugins.plaincredentials.impl.* | |
def _cred = CredentialsProvider.lookupCredentials( | |
Credentials.class, | |
Jenkins.getInstance(), | |
null, | |
null | |
) | |
for (c in _cred) { | |
if (c.getClass() == StringCredentialsImpl) { | |
println "${c.id} -> ${c.getSecret()}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment