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

Regression in Git Parameter Plugin 0.11.0: GitParameterValue treated as StringParameterValue

XMLWordPrintable

      After updating the git parameter plugin to 0.11.0 my previously working pipeline began failing with the following error:
      ERROR: Invalid parameter value: (StringParameterValue)
      This occurred while passing a Git parameter to a downstream job using:
      string(name: 'branch_name', value: params.branch_name.replaceAll('origin/',''))
       
      Thinking this was a type mismatch issue introduced in the update, I changed the code to use the explicit GitParameterValue type:

      [$class: 'GitParameterValue', name: 'branch_name', value: params.branch_name.replaceAll('origin/',''))]

      Despite this, the error persists. Jenkins still logs the parameter as a StringParameterValue, and fails validation — even though the downstream job defines branch_name as a Git parameter of type "Branch".

      This behavior did not occur in earlier versions of the plugin, and appears to be a regression in 0.11.0. It seems that  $class:'GitParameterValue'  is either ignored or improperly handled.

      I hope this helps, and I’m happy to assist with further debugging if needed.

            klimas7 Boguslaw Klimas
            andremachado André
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: