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 16:44:08 UTC

[maven-surefire] branch jenkins-deploy-master updated (6525b00 -> e1c84af)

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.


 discard 6525b00  Deploy artifacts only for master branch
     new e1c84af  Deploy artifacts only for master branch

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6525b00)
            \
             N -- N -- N   refs/heads/jenkins-deploy-master (e1c84af)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

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.


Summary of changes:
 Jenkinsfile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

[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 e1c84af2739b4920fae5ea7281da0231cb7c1822
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Fri Dec 31 16:57:54 2021 +0100

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

diff --git a/Jenkinsfile b/Jenkinsfile
index 2ef2b4a..c811269 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,22 @@ 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']
+
+        println "111 first=" + first + "branch="  + env.BRANCH_NAME
+
+        if ( first && env.BRANCH_NAME == 'master' ) {
+            cmd += goalsDepl
+        } else {
+            cmd += goals
+        }
+
+        println "222"
+
+        cmd += options + properties
+
+        println "333"
 
         stage("build ${stageKey}") {
 
@@ -166,7 +180,7 @@ def buildProcess(String stageKey, String jdkName, String mvnName, goals, options
         }
     } finally {
         try {
-            if (makeReports) {
+            if (first) {
                 jacoco(changeBuildStatus: false,
                         execPattern: '**/*.exec',
                         sourcePattern: sourcesPatternCsv(),