Git Parameters returning default and no error logged

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I get intermitten results from the gitParameter option.

      Sometime I get

      no list, and the default is chosen

      a partial list of  branches

      a full list of branches (rarely)

      This is what is in my pipeline script 

      gitParameter branchFilter: 'origin/(.*)', defaultValue: 'master', name: 'BRANCH_NAME', type: 'PT_BRANCH'

      stage('Checkout') {
          steps {
              dir ('code') {
                  git(branch: "${params.BRANCH_NAME}", url: 'XXXXXX')
              }
          }
      }

       

      Is there a way to fix this or can we allow users to enter a branch name manually?

      My scenario is I need the jobs definition to be stored in  git, hence I am using pipeline jobs stored as JenkinsFiles.

      multibranch pipeline job does not suit as these jobs are to be triggered by users, and/or cron.

       

            Assignee:
            Unassigned
            Reporter:
            Phil Rumble
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: