You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/09/22 10:25:56 UTC

[maven] 03/03: build on nodes instead of running ITs

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

hboutemy pushed a commit to branch reproducible
in repository https://gitbox.apache.org/repos/asf/maven.git

commit f9172c7ad8a6d7d6cba2db24b7cab393f4d6db74
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Sep 22 12:25:49 2019 +0200

    build on nodes instead of running ITs
---
 Jenkinsfile | 49 ++++++++++++-------------------------------------
 1 file changed, 12 insertions(+), 37 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 5d5d998..6e54ae8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -79,47 +79,22 @@ for (String os in runITsOses) {
         echo "OS: ${os} JDK: ${jdk} => Label: ${osLabel} JDK: ${jdkName}"
 
         String stageId = "${os}-jdk${jdk}"
-        String stageLabel = "Run ITs ${os.capitalize()} Java ${jdk}"
+        String stageLabel = "Rebuild ${os.capitalize()} Java ${jdk}"
         runITsTasks[stageId] = {
             node(jenkinsEnv.nodeSelection(osLabel)) {
                 stage("${stageLabel}") {
                     echo "NODE_NAME = ${env.NODE_NAME}"
-                    // on Windows, need a short path or we hit 256 character limit for paths
-                    // using EXECUTOR_NUMBER guarantees that concurrent builds on same agent
-                    // will not trample each other plus workaround for JENKINS-52657
-                    dir(isUnix() ? 'test' : "c:\\mvn-it-${EXECUTOR_NUMBER}.tmp") {
-                        def WORK_DIR=pwd()
-                        checkout tests
-                        if (isUnix()) {
-                            sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
-                        } else {
-                            bat "if exist it-local-repo rmdir /s /q it-local-repo"
-                            bat "if exist apache-maven-dist.zip del /q apache-maven-dist.zip"
-                        }
-                        unstash 'dist'
-                        try {
-                            withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[
-                                junitPublisher(ignoreAttachments: false)
-                            ]) {
-                                String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/apache-maven-dist.zip -Dmaven.test.failure.ignore=true"
-                                if (stageId.endsWith('-jdk7')) {
-                                    // Java 7u80 has TLS 1.2 disabled by default: need to explicitly enable
-                                    cmd = "${cmd} -Dhttps.protocols=TLSv1.2"
-                                }
-
-                                if (isUnix()) {
-                                    sh 'df -hT'
-                                    sh "${cmd}"
-                                } else {
-                                    bat 'wmic logicaldisk get size,freespace,caption'
-                                    bat "${cmd}"
-                                }
-                            }
-                        } finally {
-                            archiveDirs(stageId, ['core-it-suite-logs':'core-it-suite/target/test-classes',
-                                                  'core-it-suite-reports':'core-it-suite/target/surefire-reports'])
-                            deleteDir() // clean up after ourselves to reduce disk space
-                        }
+                    checkout scm
+                    withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/.repository", options:[
+                        artifactsPublisher(disabled: false),
+                        junitPublisher(ignoreAttachments: false),
+                        findbugsPublisher(disabled: false),
+                        openTasksPublisher(disabled: false),
+                        dependenciesFingerprintPublisher(),
+                        invokerPublisher(),
+                        pipelineGraphPublisher()
+                    ]) {
+                        sh "mvn clean ${MAVEN_GOAL} -B -U -e -fae -V -DskipTests"
                     }
                 }
             }