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

GIT_PREVIOUS_COMMIT null for first build of branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None
    • Jenkins 2.121
      git-plugin 3.8.0

      On the first build of a branch on Jenkins, GIT_PREVIOUS_COMMIT is null when I get it in a scripted pipeline (using the return value of checkout()).

      On the wiki documentation of the git-plugin it is noted that GIT_PREVIOUS_COMMIT should have the value of the current build SHA. That's not the current behavior.

            Unassigned Unassigned
            eliah_rebstock Eliah Rebstock
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: