Skip to content

Instantly share code, notes, and snippets.

@camiloribeiro
Last active November 23, 2016 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camiloribeiro/24e5d8f285e36404cfb9741a415dde2d to your computer and use it in GitHub Desktop.
Save camiloribeiro/24e5d8f285e36404cfb9741a415dde2d to your computer and use it in GitHub Desktop.
Example jenkins 2 pipeline
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