Created
November 12, 2019 09:00
-
-
Save dzerrenner/6c46ecf68d9065142d4e997b5a25bb9e to your computer and use it in GitHub Desktop.
Jenkins pipelines: parallel execution
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 | |
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