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

Provide GIT_COMMIT_SHORT environment variable

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • git-plugin
    • None

    Description

      GIT_COMMIT env variable provides SHA of the current commit being build.

      Please also provide GIT_COMMIT_SHORT env variable that contains the short format of SHA that is easier to read and to use as build qualifier.

      e.g. 81995adb1726ffdd1ab9c8911fe2bfa2a96f6679 would be shown as 81995ad

      Links:
      https://stackoverflow.com/questions/5694389/get-the-short-git-version-hash#answer-5694416

      https://git-scm.com/docs/git-rev-parse

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bjmi Björn Michael
              Votes:
              6 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: