Skip to content

Commit

Permalink
ci(jenkins): allow releasing from release-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschmidt committed Sep 10, 2019
1 parent d9205e4 commit 76b6340
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ pipeline {
}
steps {
script {
if (env.BRANCH_NAME == 'master') {
echo 'On master. Running release step.'
if (env.BRANCH_NAME == 'master' || (env.BRANCH_NAME.length() > 8 && env.BRANCH_NAME.substring(0,8) == 'release-')) {
echo 'On master or release-branch. Running release step.'
sh 'make release'
} else if (env.BRANCH_NAME.substring(0,3) == 'PR-') {
echo 'On PR branch. Running release step in dry-run mode.'
sh "make release_dry_run BRANCH=${env.BRANCH_NAME}"
} else {
echo('Not on master nor a PR branch. Skipping release step.')
echo('Unknown branch type. Skipping release step.')
}
}
}
Expand Down

0 comments on commit 76b6340

Please sign in to comment.