Przeglądaj źródła

ci(jenkins): deploy stages run in standalone pipeline job (BRANCH_NAME unset), not multibranch-only

- gate deploy/migration/inject on (!BRANCH_NAME || BRANCH_NAME in main/dev) so antooza-dev-* standalone jobs actually run deploy stages

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
KIM-JINO5 2 tygodni temu
rodzic
commit
67d193a325
1 zmienionych plików z 3 dodań i 6 usunięć
  1. 3 6
      Jenkinsfile

+ 3 - 6
Jenkinsfile

@@ -183,10 +183,7 @@ pipeline {
 
     stage('DB Migration') {
       when {
-        allOf {
-          anyOf { branch 'main'; branch 'dev' }
-          expression { env.DO_API == 'true' || env.DO_ADMIN == 'true' }
-        }
+        expression { (!env.BRANCH_NAME || env.BRANCH_NAME in ['main', 'dev']) && (env.DO_API == 'true' || env.DO_ADMIN == 'true') }
       }
       steps {
         dir(env.WORK_SUBDIR) {
@@ -206,7 +203,7 @@ pipeline {
     }
 
     stage('Inject Config') {
-      when { anyOf { branch 'main'; branch 'dev' } }
+      when { expression { !env.BRANCH_NAME || env.BRANCH_NAME in ['main', 'dev'] } }
       steps {
         dir(env.WORK_SUBDIR) {
           script {
@@ -231,7 +228,7 @@ pipeline {
     }
 
     stage('Deploy') {
-      when { anyOf { branch 'main'; branch 'dev' } }
+      when { expression { !env.BRANCH_NAME || env.BRANCH_NAME in ['main', 'dev'] } }
       parallel {
         stage('api') {
           when { expression { env.DO_API == 'true' } }