Skip to content

Commit

Permalink
Merge pull request #180 from GoogleCloudPlatform/cgrant-or-main
Browse files Browse the repository at this point in the history
Support use of Main branch as well as Master
  • Loading branch information
gitrey authored Aug 19, 2022
2 parents 2d266b6 + 321f730 commit 59676d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sample-app/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ spec:
}
stage('Deploy Production') {
// Production branch
when { branch 'master' }
when {
anyOf {
branch 'main'
branch 'master'
}
}
steps{
container('kubectl') {
// Change deployed image in canary to the one we just built
Expand All @@ -90,6 +95,7 @@ spec:
stage('Deploy Dev') {
// Developer Branches
when {
not { branch 'main' }
not { branch 'master' }
not { branch 'canary' }
}
Expand Down

0 comments on commit 59676d8

Please sign in to comment.