Created
October 27, 2016 22:29
-
-
Save pporada-gl/7d27727dc80173d0f3d594321c3f4aac to your computer and use it in GitHub Desktop.
Jenkinsfile example
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
$ cat Jenkinsfile | |
#!/usr/bin/env groovy | |
node { | |
git credentialsId: '4sdjfsdkjbfgksjdbfksjdbfkjsdbfkjsdbfjkbsdfb', url: '[email protected]:/terraform-autobot.git' | |
withEnv(["SOURCE_BUILD_NUMBER=${env.BUILD_NUMBER}"]) { | |
sh '''#!/bin/bash | |
echo $SOURCE_BUILD_NUMBER | |
echo "=======" | |
FOO=BAR | |
echo ${FOO} | |
if [ ${FOO} == "BAR" ]; then echo hi; else echo hey; fi | |
''' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment