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

'Invalid parameter value' when trying to build a job against a new branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-parameter-plugin
    • None
    • Jenkins: 2.516.1
      Git Parameter Plugin: 444.vca_b_84d3703c2

      After upgrading git-parameter plugin from 439.vb_0e46ca_14534 to 444.vca_b_84d3703c2 we started having errors in some of our jobs:

      ERROR: Invalid parameter value: (StringParameterValue) BRANCH='new-branch'

      When Bitbucket PR is created it automatically runs a jobs from new-branch and passes this branch to a different job B. Job B does have a parameter (DSL snippet):

       

      gitParameter {
        type('PT_BRANCH')
        name('BRANCH')
        useRepository('$repositoryUrl')
        description('Choose branch from $repositoryName repository')
        defaultValue('$branchName')
        selectedValue('DEFAULT')
        sortMode('ASCENDING_SMART')
        branchFilter('origin/(.*)')
        tagFilter('*')
        quickFilterEnabled(true)
        branch('')
      }

       
      When it tries to run, it throws error ERROR: Invalid parameter value: (StringParameterValue) BRANCH='new-branch' even though this branch exists (because it's the same repository).
       
      If we refresh the branch list on this job beforehand - the pipeline works.
      After reverting the version - the pipeline works as well.

            Unassigned Unassigned
            giero D
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: