Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CF9BF200C40 for ; Wed, 8 Mar 2017 17:56:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CE965160B8B; Wed, 8 Mar 2017 16:56:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F41A2160B8C for ; Wed, 8 Mar 2017 17:56:48 +0100 (CET) Received: (qmail 57691 invoked by uid 500); 8 Mar 2017 16:56:47 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 56564 invoked by uid 99); 8 Mar 2017 16:56:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Mar 2017 16:56:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E62FF3212; Wed, 8 Mar 2017 16:56:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: schulte@apache.org To: commits@maven.apache.org Date: Wed, 08 Mar 2017 16:56:56 -0000 Message-Id: <72eaebdacf24466ba859e77625e4a25f@git.apache.org> In-Reply-To: <5edfa623cc6344a0bab6119a62247643@git.apache.org> References: <5edfa623cc6344a0bab6119a62247643@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [11/36] maven git commit: Switch to resolveScm so that we get auto linking of matching integration test branches archived-at: Wed, 08 Mar 2017 16:56:50 -0000 Switch to resolveScm so that we get auto linking of matching integration test branches - Also use short paths when integration testing on windows and clean up afterwards to ensure disk space does not overflow Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5cce371c Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5cce371c Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5cce371c Branch: refs/heads/DEPMGMT Commit: 5cce371c8aee5d957d9b24e46cddc939a15aff40 Parents: e6217a4 Author: Stephen Connolly Authored: Tue Feb 21 17:33:54 2017 +0000 Committer: Stephen Connolly Committed: Thu Feb 23 12:41:52 2017 +0000 ---------------------------------------------------------------------- Jenkinsfile | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/5cce371c/Jenkinsfile ---------------------------------------------------------------------- diff --git a/Jenkinsfile b/Jenkinsfile index 5b82d78..2ac2644 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,7 +19,7 @@ properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME=='master'?'10':'5'))]) -def itBranch='master' +def tests try { node('ubuntu') { @@ -40,6 +40,7 @@ node('ubuntu') { stash includes: 'apache-maven-dist.zip', name: 'dist' } junit allowEmptyResults: true, testResults:'**/target/*-reports/*.xml' + tests = resolveScm source: [$class: 'GitSCMSource', credentialsId: '', excludes: '', gitTool: 'Default', id: '_', ignoreOnPushNotifications: false, includes: '*', remote: 'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git'], targets: [BRANCH_NAME, 'master'] } } @@ -52,13 +53,14 @@ parallel linuxJava7:{ echo "Running integration tests with Java $JAVA_NIX_J7" dir('test') { def WORK_DIR=pwd() - git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: itBranch) + checkout tests sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo" unstash 'dist' withEnv(["PATH+MAVEN=$MAVEN_NIX_J7/bin","PATH+JDK=$JAVA_NIX_J7/bin"]) { sh "mvn clean install -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip" } junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml' + deleteDir() // clean up after ourselves to reduce disk space } } },linuxJava8: { @@ -69,13 +71,14 @@ parallel linuxJava7:{ echo "Running integration tests with Java $JAVA_NIX_J8" dir('test') { def WORK_DIR=pwd() - git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: itBranch) + checkout tests sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo" unstash 'dist' withEnv(["PATH+MAVEN=$MAVEN_NIX_J8/bin","PATH+JDK=$JAVA_NIX_J8/bin"]) { sh "mvn clean install -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip" } junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml' + deleteDir() // clean up after ourselves to reduce disk space } } }, winJava7: { @@ -90,9 +93,12 @@ parallel linuxJava7:{ JAVA_WIN_J7=pwd() } echo "Running integration tests with Java $JAVA_WIN_J7" - dir('test') { + // 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 + dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") { def WORK_DIR=pwd() - git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: itBranch) + checkout tests 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" withEnv(["Path+MAVEN=$MAVEN_WIN_J7\\bin","Path+JDK=$JAVA_WIN_J7\\bin","JAVA_HOME=$JAVA_WIN_J7"]) { @@ -101,6 +107,7 @@ parallel linuxJava7:{ bat "mvn clean install -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip" } junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml' + deleteDir() // clean up after ourselves to reduce disk space } } }, winJava8: { @@ -115,9 +122,12 @@ parallel linuxJava7:{ JAVA_WIN_J8=pwd() } echo "Running integration tests with Java $JAVA_WIN_J8" - dir('test') { + // 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 + dir("/mvn-it-${EXECUTOR_NUMBER}.tmp") { def WORK_DIR=pwd() - git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: itBranch) + checkout tests 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" withEnv(["Path+MAVEN=$MAVEN_WIN_J8\\bin","Path+JDK=$JAVA_WIN_J8\\bin","JAVA_HOME=$JAVA_WIN_J8"]) { @@ -126,6 +136,7 @@ parallel linuxJava7:{ bat "mvn clean install -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/apache-maven-dist.zip" } junit allowEmptyResults: true, testResults:'core-it-support/**/target/*-reports/*.xml,core-it-suite/target/*-reports/*.xml' + deleteDir() // clean up after ourselves to reduce disk space } } }