Skip to content

Instantly share code, notes, and snippets.

@wololock
Last active June 24, 2020 09:14
Show Gist options
  • Save wololock/9e9e0abc55858a735e00c5c9b6e54fe8 to your computer and use it in GitHub Desktop.
Save wololock/9e9e0abc55858a735e00c5c9b6e54fe8 to your computer and use it in GitHub Desktop.
Jenkins Pipeline with the parallel stages
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"
}
}
}
}
}
}
@wololock
Copy link
Author

Przechwycenie obrazu ekranu_2020-06-24_11-13-27

Przechwycenie obrazu ekranu_2020-06-24_11-13-47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment