Skip to content

Instantly share code, notes, and snippets.

@dzerrenner
Created November 12, 2019 09:00
Show Gist options
  • Save dzerrenner/6c46ecf68d9065142d4e997b5a25bb9e to your computer and use it in GitHub Desktop.
Save dzerrenner/6c46ecf68d9065142d4e997b5a25bb9e to your computer and use it in GitHub Desktop.
Jenkins pipelines: parallel execution
pipeline {
agent any
stages {
stage('SmokeTest'){
parallel{
stage('SmokeTest ProdEnv') {
steps {
echo 'Sanity Testing Production Environment',
build job: 'smoke test',
parameters: [[
$class: 'StringParameterValue',
name: 'TESTENV',
value: 'production',
]]
}
}
stage('SmokeTest IntegEnv') {
steps {
echo 'Sanity Testing Integration Environment',
build job: 'smoke test',
parameters: [[
$class: 'StringParameterValue',
name: 'TESTENV',
value: 'integration',
]]
}
}
stage('SmokeTest TestEnv') {
steps {
echo 'Sanity Testing Test Environment',
build job: 'smoke test',
parameters: [[
$class: 'StringParameterValue',
name: 'TESTENV',
value: 'test',
]]
}
}
}
}
}
post{
failure{
mail to: 's166205@hft-leipzig.de, stakeholder@company.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment