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

The job param Git_Branch is overwritten by git plugin when build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • git-plugin
    • Jenkins 2.332.3 and Jenkins 2.414.3
      git plugin version: 5.2.1 and 4.11.1

      When I ran a shell script through pipeline job today, I found that the Git_Branch parameter value I got from the bash script was different from the Git_Branch value I passed in when I triggered the job.

      After analysis and debugging, I found that the git plugin tampered with the value of the job parameter Git_Branch. And I found that freestyle job had similar issue.

       

      The phenomenon is as follows:

      When I use b1234567 to trigger the pipeline job, the value the Git_Branch shell script gets is the branch information used by the git plug-in.

      When I trigger freestyle job in the same way, the Git_Branch value is overwritten when the git plug-in is used.

      The Git_Branch value is correctly get when the git plug-in is not used

            markewaite Mark Waite
            tao tao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: