Last active
June 24, 2020 09:14
-
-
Save wololock/9e9e0abc55858a735e00c5c9b6e54fe8 to your computer and use it in GitHub Desktop.
Jenkins Pipeline with the parallel stages
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
pipeline { | |
agent any | |
stages { | |
stage("Deploy") { | |
parallel { | |
stage("dev") { | |
when { | |
beforeAgent true | |
expression { | |
params.DEPLOY_DEV == true | |
} | |
} | |
steps { | |
echo "Deploying to dev" | |
} | |
} | |
stage("staging") { | |
when { | |
beforeAgent true | |
expression { | |
params.DEPLOY_STAGING == true | |
} | |
} | |
steps { | |
echo "Deploying to staging" | |
} | |
} | |
stage("prod") { | |
when { | |
beforeAgent true | |
expression { | |
params.DEPLOY_PROD == true | |
} | |
} | |
steps { | |
echo "Deploying to prod" | |
} | |
} | |
} | |
} | |
} | |
} |
Author
wololock
commented
Jun 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment