This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MNG-7063 in repository https://gitbox.apache.org/repos/asf/maven.git
commit 7f517ed320c8a0f9729893e147d7d97cfcb91652 Author: rfscholte <rfscho...@apache.org> AuthorDate: Fri Feb 5 11:31:28 2021 +0100 Make sure ITs can still be used to verify older Maven versions --- Jenkinsfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index ba9c3c8..5996152 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -127,6 +127,47 @@ for (String os in runITsOses) { } } } + + // Verify that ITs can still be used for older Maven versions + String m3 = '3.6.3' + String stageId = "${os}-jdk${buildJdk}-${m3}" + String stageLabel = "Run ITs ${os.capitalize()} Java ${buildJdk} Maven ${m3}" + 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/dists $WORK_DIR/it-local-repo" + } else { + bat "if exist it-local-repo rmdir /s /q it-local-repo" + bat "if exist dists rmdir /s /q dists" + } + try { + withMaven(jdk: jdkName, maven: mvnName, mavenLocalRepo:"${WORK_DIR}/it-local-repo", options:[ + junitPublisher(ignoreAttachments: false) + ]) { + String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/dists/apache-maven-bin.zip -Dmaven.test.failure.ignore=true -DmavenVersion={m3}" + if (isUnix()) { + sh "${cmd}" + } else { + 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 + } + } + } + } + } } }