Created
March 24, 2022 21:47
-
-
Save danielsiwiec/2685b76422f9fa2c555bb086eb919b86 to your computer and use it in GitHub Desktop.
Scripted Pipeline
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
node { | |
stage('Build and test') { | |
echo 'Building and testing...' | |
} | |
if (env.BRANCH_NAME == 'master') { | |
['qa', 'prod'].each { environment -> | |
stage("Deploy to $environment") { | |
echo 'I only execute on the master branch' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment