You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/01/01 13:33:43 UTC

[maven-surefire] 01/01: Deploy artifacts only for master branch

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch jenkins-deploy-master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 7db8cd664de94c5be73ff1cdc4c075490962bd63
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Fri Dec 31 16:57:54 2021 +0100

    Deploy artifacts only for master branch
---
 Jenkinsfile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2ef2b4a..4351ab7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -36,7 +36,7 @@ final def jdks = [18, 17, 8]
 
 final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
 final def goals = ['clean', 'install']
-final def goalsDepl = ['clean', 'deploy', 'jacoco:report']
+final def goalsDepl = ['clean', 'deploy']
 final Map stages = [:]
 
 oses.eachWithIndex { osMapping, indexOfOs ->
@@ -69,7 +69,9 @@ oses.eachWithIndex { osMapping, indexOfOs ->
                             allOptions += '--no-transfer-progress'
                         }
                         ws(dir: "${os == 'windows' ? "${TEMP}\\${BUILD_TAG}" : pwd()}") {
-                            buildProcess(stageKey, jdkName, mvnName, first ? goalsDepl : goals, allOptions, mavenOpts, first)
+                            buildProcess(stageKey, jdkName, mvnName,
+                                first  && env.BRANCH_NAME == 'master' ? goalsDepl : goals,
+                                allOptions, mavenOpts, first)
                         }
                     }
                 }
@@ -164,6 +166,10 @@ def buildProcess(String stageKey, String jdkName, String mvnName, goals, options
                 unstable(" executing command status= " + errorStatus)
             }
         }
+
+    } catch (Throwable e) {
+        println "Throwable: ${e}"
+        throw e
     } finally {
         try {
             if (makeReports) {