Last active
November 23, 2016 23:17
-
-
Save camiloribeiro/24e5d8f285e36404cfb9741a415dde2d to your computer and use it in GitHub Desktop.
Example jenkins 2 pipeline
This file contains hidden or 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
stage 'test' | |
parallel ( | |
"scenario A": { | |
node { | |
echo 'dry run' | |
} | |
}, | |
"scenario B": { | |
node { | |
echo 'dry run' | |
} | |
} | |
) | |
stage 'build' | |
node('docker') { | |
echo 'dry run' | |
} | |
stage 'qa' | |
node { | |
withCredentials([usernamePassword(credentialsId: 'example_credential', | |
passwordVariable: 'pass', usernameVariable: 'user')]) { | |
sh 'echo $user' | |
sh 'echo $pass' | |
} | |
} | |
stage 'deploy' | |
node { | |
echo 'dry run step 1' | |
sh "sleep 4s" | |
echo 'dry run step 2' | |
sh "sleep 4s" | |
echo 'dry run step 3' | |
sh "sleep 4s" | |
echo 'dry run step 4' | |
sh "sleep 4s" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment