From f64b7cae0cdfbfa7e7010e941375191eb1977d88 Mon Sep 17 00:00:00 2001 From: Gang Li Date: Thu, 2 Nov 2023 09:55:45 +0800 Subject: [PATCH] Fix Jenkinsfile for deploy stage condition --- Jenkinsfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2ed7cdc..1e24e2d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,7 +59,12 @@ pipeline { } } stage('Deploy') { - when { branch 'main' } + when { + allOf { + expression { my_bc != null } + expression { env.CHANGE_ID == null } // Not pull request + } + } steps { echo "Deploy" sh '${M2_HOME}/bin/mvn help:effective-settings -B -V clean deploy -e -DskipTests'