@@ -42,7 +42,6 @@ node('s390x') {
42
42
43
43
stage('Build / Unit Test') {
44
44
String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
45
- jdkName = "ibm-semeru-8u362-b09"
46
45
String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
47
46
try {
48
47
withEnv(["JAVA_HOME=${ tool "$jdkName" }",
@@ -79,10 +78,20 @@ for (String os in runITsOses) {
79
78
// will not trample each other plus workaround for JENKINS-52657
80
79
dir(isUnix() ? 'test' : "c:\\mvn-it-${EXECUTOR_NUMBER}.tmp") {
81
80
def WORK_DIR=pwd()
82
- checkout([$class: 'GitSCM',
83
- branches: [[name: "*/master"]],
84
- extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
85
- userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])
81
+ def ITS_BRANCH = env.CHANGE_BRANCH != null ? env.CHANGE_BRANCH : env.BRANCH_NAME;
82
+ try {
83
+ echo "Checkout ITs from branch: ${ITS_BRANCH}"
84
+ checkout([$class: 'GitSCM',
85
+ branches: [[name: ITS_BRANCH]],
86
+ extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
87
+ userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])
88
+ } catch (Throwable e) {
89
+ echo "Failure checkout ITs branch: ${ITS_BRANCH} - fallback master branch"
90
+ checkout([$class: 'GitSCM',
91
+ branches: [[name: "*/master"]],
92
+ extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
93
+ userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])
94
+ }
86
95
if (isUnix()) {
87
96
sh "rm -rvf $WORK_DIR/dists $WORK_DIR/it-local-repo"
88
97
} else {
0 commit comments