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

GIT_REVISION no longer set in git plugin 4.0.0-rc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • None
    • Jenkins = 2.150.2
      Git plugin = 4.0.0-rc
      Build Name Setter = 1.6.9
      Token Macro = 2.5

      Support for GIT_REVISION macro appears to be replaced by GIT_COMMIT however the replacement does not support the length parameter.  Consequently "Build Name Setter" plugin is unable to set build names based on only the first few chars of the SHA so build names are massive.

      To reproduce:

      1. Use Jenkins 2.150.2, Git plugin 4.0.0-rc, build name setter 1.6.9

      2. Setup a build using a freestyle project that points to a git repo

      3. Under "Build Environment" settings for the project select "Set Build Name" and specify name as "${BUILD_NUMBER}${GIT_BRANCH}${GIT_COMMIT,length=4}" & enable "Set build name before build starts"

      4. Manually trigger a build

      5. View the build console output and see:
      01:04:17 Set build name.01:04:17 Unrecognized macro 'GIT_COMMIT' in '1170-origin/merge/QtSimLinuxFixes-${GIT_COMMIT,length=4}'

            Unassigned Unassigned
            ijd02 Ian Davis
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: