Created
July 1, 2017 05:08
-
-
Save duduribeiro/5beaf7df963eded273d83d451c62b06c to your computer and use it in GitHub Desktop.
review_app-Jenkinsfile-stages
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
stage('Deploy to Staging') { | |
when { | |
expression { env.BRANCH_NAME == 'master' } | |
} | |
steps { | |
echo 'deploy to staging' | |
createEnvironment('staging') | |
} | |
} | |
stage('Create feature environment') { | |
when { | |
expression { env.BRANCH_NAME != 'master' } | |
} | |
steps { | |
echo 'create custom environment' | |
createEnvironment(env.BRANCH_NAME) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment