#3146 Fix the CICO pipeline to check out the right branch
Merged 6 years ago by pingou. Opened 6 years ago by bstinson.
bstinson/pagure ci-pr-branch-checkout-fix  into  master

file modified
+3 -2
@@ -36,8 +36,9 @@ 

          }

  

          stage('Clone Test Suite') {

-             if (env.BRANCH_NAME){

-                 onmyduffynode "git clone -b \"${env.BRANCH_NAME}\" --single-branch --depth 1 https://pagure.io/pagure.git"

+             if (params.BRANCH){

+                 println "Checking out branch: ${params.BRANCH}"

+                 onmyduffynode "git clone -b \"${params.BRANCH}\" --single-branch --depth 1 https://pagure.io/pagure.git"

              } else {

                  onmyduffynode "git clone --single-branch --depth 1 https://pagure.io/pagure.git"

              }

We should use params.BRANCH, which is the variable where we actually store the base branch of the PR

Pull-Request has been merged by pingou

6 years ago
Metadata