You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2023/09/26 05:10:37 UTC

[GitHub] [maven] gnodet commented on a diff in pull request #1263: Use the same branch name for ITs on Jenkins

gnodet commented on code in PR #1263:
URL: https://github.com/apache/maven/pull/1263#discussion_r1336630910


##########
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']]])

Review Comment:
   We're still using the `maven-integration-testing` GitHub repo, but it needs to point to the same repository from the PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org