You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by st...@apache.org on 2016/12/19 13:19:37 UTC
maven git commit: Switch to old Jenkinsfile format as that is
supported on builds.apache.org
Repository: maven
Updated Branches:
refs/heads/master e5ef55323 -> 2bcb26e24
Switch to old Jenkinsfile format as that is supported on builds.apache.org
- Should work for *nix, need to get ITs running on windows also
Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/2bcb26e2
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/2bcb26e2
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/2bcb26e2
Branch: refs/heads/master
Commit: 2bcb26e246a5c97bbb9b94599c47d8285ee161ab
Parents: e5ef553
Author: Stephen Connolly <st...@gmail.com>
Authored: Mon Dec 19 13:19:31 2016 +0000
Committer: Stephen Connolly <st...@gmail.com>
Committed: Mon Dec 19 13:19:31 2016 +0000
----------------------------------------------------------------------
Jenkinsfile | 75 ++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 59 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven/blob/2bcb26e2/Jenkinsfile
----------------------------------------------------------------------
diff --git a/Jenkinsfile b/Jenkinsfile
index 0ce9859..ba10f20 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,26 +17,69 @@
* under the License.
*/
-pipeline {
-
- tools {
- maven "maven-3"
- }
-
- agent label:"java"
+properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME=='master'?'10':'5'))])
- post {
- always {
- archive '**/apache-maven/targer/apache-mavent-*'
- junit '**/target/*-reports/*.xml'
+node('ubuntu') {
+ stage 'Checkout'
+ def MAVEN_BUILD=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
+ def JAVA7_HOME=tool name: 'JDK 1.7 (latest)', type: 'hudson.model.JDK'
+ dir('build') {
+ checkout scm
+ def WORK_DIR=pwd()
+ stage 'Build / Unit Test'
+ withEnv(["PATH+MAVEN=$MAVEN_BUILD/bin","PATH+JDK=$JAVA7_HOME/bin"]) {
+ sh "mvn clean verify -B -U -e -fae -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/.repository -DskipTests"
+ }
+ dir ('apache-maven/target') {
+ stash includes: 'apache-maven-*-bin.zip', name: 'dist'
}
}
+}
- stages {
- stage('build') {
- steps {
- sh 'mvn clean verify'
- }
+stage 'Integration Test (smoke)'
+node('ubuntu') {
+ def MAVEN_NIX_J7=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
+ def JAVA_NIX_J7=tool name: 'JDK 1.7 (latest)', type: 'hudson.model.JDK'
+ dir('test') {
+ def WORK_DIR=pwd()
+ git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: 'master')
+ sh "rm -rvf $WORK_DIR/apache-maven-*-bin.zip $WORK_DIR/it-local-repo $WORK_DIR/it-local-maven $WORK_DIR/apache-maven-*"
+ unstash 'dist'
+ sh "unzip apache-maven-*-bin.zip -d $WORK_DIR"
+ sh "mv \$(find $WORK_DIR -type d -maxdepth 1 -name apache-maven-\\*) $WORK_DIR/it-local-maven"
+ withEnv(["PATH+MAVEN=$MAVEN_NIX_J7/bin","PATH+JDK=$JAVA_NIX_J7/bin"]) {
+ sh "mvn clean verify -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -Dmaven.home=$WORK_DIR/it-local-maven"
+ junit allowEmptyResults: true, testResults:'**/target/*-reports/*.xml'
}
}
}
+
+stage 'Integration Test (full)'
+parallel linuxJava8: {
+ node('ubuntu') {
+ def MAVEN_NIX_J8=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
+ def JAVA_NIX_J8=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
+ dir('test') {
+ def WORK_DIR=pwd()
+ git(url:'https://git-wip-us.apache.org/repos/asf/maven-integration-testing.git', branch: 'master')
+ sh "rm -rvf $WORK_DIR/apache-maven-*-bin.zip $WORK_DIR/it-local-repo $WORK_DIR/it-local-maven $WORK_DIR/apache-maven-*"
+ unstash 'dist'
+ sh "unzip apache-maven-*-bin.zip -d $WORK_DIR"
+ sh "mv \$(find $WORK_DIR -type d -maxdepth 1 -name apache-maven-\\*) $WORK_DIR/it-local-maven"
+ withEnv(["PATH+MAVEN=$MAVEN_NIX_J8/bin","PATH+JDK=$JAVA_NIX_J8/bin"]) {
+ sh "mvn clean verify -Prun-its -B -U -V -Dmaven.test.failure.ignore=true -Dmaven.repo.local=$WORK_DIR/it-local-repo -Dmaven.home=$WORK_DIR/it-local-maven"
+ junit allowEmptyResults: true, testResults:'**/target/*-reports/*.xml'
+ }
+ }
+ }
+ }, winJava7: {
+ node('windows') {
+ def MAVEN_WIN_J7=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
+ def JAVA_WIN_J7=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
+ }
+ }, winJava8: {
+ node('windows') {
+ def MAVEN_WIN_J8=tool name: 'Maven 3.3.9', type: 'hudson.tasks.Maven$MavenInstallation'
+ def JAVA_WIN_J8=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
+ }
+ }
\ No newline at end of file