Skip to content

Commit 1a61b80

Browse files
Improve build on s390 (#1313)
* Use JDK 11 as default for s390 builds * Checkout the same branch name for ITs as for build
1 parent 9d65e2b commit 1a61b80

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Jenkinsfile.s390x

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ node('s390x') {
4242

4343
stage('Build / Unit Test') {
4444
String jdkName = jenkinsEnv.jdkFromVersion(buildOs, buildJdk)
45-
jdkName = "ibm-semeru-8u362-b09"
4645
String mvnName = jenkinsEnv.mvnFromVersion(buildOs, buildMvn)
4746
try {
4847
withEnv(["JAVA_HOME=${ tool "$jdkName" }",
@@ -79,10 +78,20 @@ for (String os in runITsOses) {
7978
// will not trample each other plus workaround for JENKINS-52657
8079
dir(isUnix() ? 'test' : "c:\\mvn-it-${EXECUTOR_NUMBER}.tmp") {
8180
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+
}
8695
if (isUnix()) {
8796
sh "rm -rvf $WORK_DIR/dists $WORK_DIR/it-local-repo"
8897
} else {

0 commit comments

Comments
 (0)