Last active
May 15, 2021 14:51
-
-
Save joseb0rges/0fbaa25d64d3f3b338e92902d3c00fa0 to your computer and use it in GitHub Desktop.
Script_Groovy_Multibranch
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('checkout') { | |
checkout scm | |
} | |
stage('deploy') { | |
echo 'branch name ' + env.BRANCH_NAME | |
if (env.BRANCH_NAME.startsWith("Feature_")) { | |
sh "mvn sonar:sonar" | |
sh "mvn test" | |
} else if (env.BRANCH_NAME.startsWith("Release_")) { | |
sh "mvn sonar:sonar" | |
sh "mvn test" | |
} else if (env.BRANCH_NAME.startsWith("master")) { | |
sh "mvn sonar:sonar" | |
sh "mvn test" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment