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 2021/12/31 15:59:10 UTC

[maven-surefire] branch jenkins-deploy-master created (now 50be172)

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

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


      at 50be172  Deploy artifacts only for master branch

This branch includes the following new commits:

     new 50be172  Deploy artifacts only for master branch

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


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

Posted by sj...@apache.org.
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 50be1727a8cfc7cb85d5030630fec8b939bac2f6
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Fri Dec 31 16:57:54 2021 +0100

    Deploy artifacts only for master branch
---
 Jenkinsfile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 2ef2b4a..def126d 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,7 @@ 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, allOptions, mavenOpts, first)
                         }
                     }
                 }
@@ -113,7 +113,7 @@ timeout(time: 12, unit: 'HOURS') {
     }
 }
 
-def buildProcess(String stageKey, String jdkName, String mvnName, goals, options, mavenOpts, boolean makeReports) {
+def buildProcess(String stageKey, String jdkName, String mvnName, options, mavenOpts, boolean first) {
     cleanWs()
     def errorStatus = -99
     try {
@@ -129,8 +129,8 @@ def buildProcess(String stageKey, String jdkName, String mvnName, goals, options
         println "Maven Local Repository = ${mvnLocalRepoDir}."
         assert mvnLocalRepoDir != null : 'Local Maven Repository is undefined.'
 
-        def properties = ["-Djacoco.skip=${!makeReports}", "\"-Dmaven.repo.local=${mvnLocalRepoDir}\""]
-        def cmd = ['mvn'] + goals + options + properties
+        def properties = ["-Djacoco.skip=${!first}", "\"-Dmaven.repo.local=${mvnLocalRepoDir}\""]
+        def cmd = ['mvn'] + ( first && env.BRANCH_NAME == 'master' ? goalsDepl : goals ) + options + properties
 
         stage("build ${stageKey}") {
 
@@ -166,7 +166,7 @@ def buildProcess(String stageKey, String jdkName, String mvnName, goals, options
         }
     } finally {
         try {
-            if (makeReports) {
+            if (first) {
                 jacoco(changeBuildStatus: false,
                         execPattern: '**/*.exec',
                         sourcePattern: sourcesPatternCsv(),