You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2023/10/17 19:19:11 UTC

[maven] branch jenkins-3.9-branch created (now 360ca0c00a)

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a change to branch jenkins-3.9-branch
in repository https://gitbox.apache.org/repos/asf/maven.git


      at 360ca0c00a Use the same branch name for ITs on Jenkins (#1263)

This branch includes the following new commits:

     new 360ca0c00a Use the same branch name for ITs on Jenkins (#1263)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven] 01/01: Use the same branch name for ITs on Jenkins (#1263)

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch jenkins-3.9-branch
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 360ca0c00a65f79e150ae8211ade603840e333b2
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Thu Oct 5 03:44:01 2023 +0200

    Use the same branch name for ITs on Jenkins (#1263)
    
    (cherry picked from commit 882c8dd9746f2fb7bec1c2b7b6ece4b85c75f701)
---
 Jenkinsfile | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index 77c6d7c3aa..3fd3a0a5dd 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -84,10 +84,21 @@ for (String os in runITsOses) {
                     // will not trample each other plus workaround for JENKINS-52657
                     dir(isUnix() ? 'test' : "c:\\mvn-it-${EXECUTOR_NUMBER}.tmp") {
                         def WORK_DIR=pwd()
-                        checkout([$class: 'GitSCM',
-                                branches: [[name: "*/master"]],
-                                extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
-                                userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])                        
+                        def ITS_BRANCH = env.CHANGE_BRANCH != null ? env.CHANGE_BRANCH :  env.BRANCH_NAME;
+                        try {
+                          echo "Checkout ITs from branch: ${ITS_BRANCH}"
+                          checkout([$class: 'GitSCM',
+                                  branches: [[name: ITS_BRANCH]],
+                                  extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
+                                  userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])
+                        } catch (Throwable e) {
+                          echo "Failure checkout ITs branch: ${ITS_BRANCH} - fallback maven-3.9.x branch"
+                          checkout([$class: 'GitSCM',
+                                  branches: [[name: "maven-3.9.x"]],
+                                  extensions: [[$class: 'CloneOption', depth: 1, noTags: true, shallow: true]],
+                                  userRemoteConfigs: [[url: 'https://github.com/apache/maven-integration-testing.git']]])
+                        }
+
                         if (isUnix()) {
                             sh "rm -rvf $WORK_DIR/apache-maven-dist.zip $WORK_DIR/it-local-repo"
                         } else {