Last active
September 7, 2021 10:51
-
-
Save ssbostan/1f5b3288a7f5535ad8e719d667ef36b2 to your computer and use it in GitHub Desktop.
Jenkins pipeline syntax reference
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
pipeline { | |
agent any | |
environment { | |
MYUSERPASS = credentials("test-user-pass") | |
} | |
stages { | |
stage("Test") { | |
steps { | |
// Do not use " for command methods like sh, bat, powershell, pwsh, etc. | |
// Use ' to avoid groovy interpolation and command injection vulnerabilities. | |
sh 'echo $MYUSERPASS' | |
sh 'logintest --username $MYUSERPASS_USR --password $MYUSERPASS_PSW' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment