diff --git a/sample-app/Jenkinsfile b/sample-app/Jenkinsfile index b2bd8b6..04664de 100644 --- a/sample-app/Jenkinsfile +++ b/sample-app/Jenkinsfile @@ -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 @@ -90,6 +95,7 @@ spec: stage('Deploy Dev') { // Developer Branches when { + not { branch 'main' } not { branch 'master' } not { branch 'canary' } }