Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54062

Does not list branches when used as a parameter in pipeline script

XMLWordPrintable

      I noticed that the git-parameter-plugin now supports pipeline scripts, however I can not get the plugin to pickup branches for my repository. For instance, I setup my pipeline script according to the documentation:

       

       

      pipeline {
          agent any
          parameters {
              gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_A', type: 'PT_BRANCH', useRepository: '.*crowd.git'
              gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_B', type: 'PT_BRANCH', useRepository: '.*crowd-ember.git'
          }
          stages {
              stage('Git Checkouts') {
                  steps {
                      git branch: "${params.BRANCH_A}", credentialsId: 'e9e6e6f8-4c03-4460-ac4f-f2495315ef11', url: 'git@githost.org:crowd/crowd'
                      git branch: "${params.BRANCH_B}", credentialsId: 'e9e6e6f8-4c03-4460-ac4f-f2495315ef11', url: 'git@githost.org:crowd/crowd-ember'
                  }
              }
          }
      }

       

      The job has been setup as a "Pipeline" type and the script above is what I placed in its "Pipleline Script" section. 

      And yet, when I run my pipeline script I only see:

       

       

      Not entirely sure what I'm doing wrong here...

       

       

            klimas7 Boguslaw Klimas
            ctataryn Craig Tataryn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: