@@ -84,10 +84,21 @@ for (String os in runITsOses) {
84
84
// will not trample each other plus workaround for JENKINS-52657
85
85
dir(isUnix() ? ' test' : " c:\\ mvn-it-${ EXECUTOR_NUMBER} .tmp" ) {
86
86
def WORK_DIR = pwd()
87
- checkout([$class : ' GitSCM' ,
88
- branches : [[name : " */master" ]],
89
- extensions : [[$class : ' CloneOption' , depth : 1 , noTags : true , shallow : true ]],
90
- userRemoteConfigs : [[url : ' https://github.com/apache/maven-integration-testing.git' ]]])
87
+ def ITS_BRANCH = env. CHANGE_BRANCH != null ? env. CHANGE_BRANCH : env. BRANCH_NAME ;
88
+ try {
89
+ echo " Checkout ITs from branch: ${ ITS_BRANCH} "
90
+ checkout([$class : ' GitSCM' ,
91
+ branches : [[name : ITS_BRANCH ]],
92
+ extensions : [[$class : ' CloneOption' , depth : 1 , noTags : true , shallow : true ]],
93
+ userRemoteConfigs : [[url : ' https://github.com/apache/maven-integration-testing.git' ]]])
94
+ } catch (Throwable e) {
95
+ echo " Failure checkout ITs branch: ${ ITS_BRANCH} - fallback maven-3.9.x branch"
96
+ checkout([$class : ' GitSCM' ,
97
+ branches : [[name : " maven-3.9.x" ]],
98
+ extensions : [[$class : ' CloneOption' , depth : 1 , noTags : true , shallow : true ]],
99
+ userRemoteConfigs : [[url : ' https://github.com/apache/maven-integration-testing.git' ]]])
100
+ }
101
+
91
102
if (isUnix()) {
92
103
sh " rm -rvf $WORK_DIR /apache-maven-dist.zip $WORK_DIR /it-local-repo"
93
104
} else {
0 commit comments