Created
January 21, 2019 01:34
-
-
Save marcosborges/92ed5fac2ef3f34e8e1ac595b6329916 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
withCredentials([ | |
string( | |
credentialsId: "SECRET_TEXT_EXEMPLE", | |
variable: "SECRET_TEXT" | |
), | |
usernamePassword( | |
credentialsId: "SECRET_USERNAME_PASSWORD_EXEMPLE", | |
usernameVariable: 'SECRET_USERNAME', | |
passwordVariable: 'SECRET_PASSWORD' | |
), | |
file( | |
credentialsId: "SECRET_FILE_EXEMPLE", | |
variable: "SECRET_FILE" | |
), | |
sshUserPrivateKey( | |
credentialsId: 'SECRET_SSH_EXAMPLE', | |
keyFileVariable: 'SECRET_SSH_KEY', | |
passphraseVariable: 'SECRET_SSH_PASSPHRASE', | |
usernameVariable: 'SECRET_SSH_USERNAME' | |
) | |
]){ | |
println "SECRET_TEXT: ${env.SECRET_TEXT}" | |
println "SECRET_USERNAME: ${env.SECRET_USERNAME}" | |
println "SECRET_PASSWORD: ${env.SECRET_PASSWORD}" | |
println "SECRET_FILE" | |
println sh "cat ${env.SECRET_FILE}" | |
println "SECRET_SSH_KEY: ${env.SECRET_SSH_KEY}" | |
println "SECRET_SSH_PASSPHRASE: ${env.SECRET_SSH_PASSPHRASE}" | |
println "SECRET_SSH_USERNAME: ${env.SECRET_SSH_USERNAME}" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment