The job param Git_Branch is overwritten by git plugin when build

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

XMLWordPrintable

      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

            Assignee:
            Mark Waite
            Reporter:
            tao
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: