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

git-plugin v4.0.0-rc not returning "lastBuiltRevision" in BuildData

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None

      After upgrading the git-plugin from 3.9.2 to 4.0.0-rc the field "lastBuiltRevision" is missing from the buildData in a projects api/json output.

      URL: https://ci.example.org/view/all/job/Project/api/json?tree=name,lastSuccessfulBuild[number,url,timestamp,result,actions[lastBuiltRevision[SHA1]]],builds[number,url,timestamp,result,actions[lastBuiltRevision[SHA1]]]\{0,20}

      On version 4.0.0-rc:

       

      {
       "_class" : "hudson.model.FreeStyleProject",
       "name" : "Project",
       "builds" : [
       {
       "_class" : "hudson.model.FreeStyleBuild",
       "actions" : [
       {
       "_class" : "hudson.model.ParametersAction"
       },
       {
       "_class" : "hudson.model.CauseAction"
       },
       {
       "_class" : "hudson.plugins.git.util.BuildDetails"
       },
       {
       "_class" : "hudson.plugins.git.GitTagAction"
       },
       {
      },
       {
      },
       {
      },
       {
      },
       {
      },
       {
      }
       ],
       "number" : 42,
       "result" : "SUCCESS",
       "timestamp" : 1549043593728,
       "url" : "https://ci.example.org/view/all/job/Project/42/"
       },
       # ...truncated...
       ]
      }
      

       

      On version 3.9.2 the output includes the following:

       

      {
       "_class" : "hudson.plugins.git.util.BuildData",
       "lastBuiltRevision" : {
       "SHA1" : "11112222333344445555666777788889999f561"
       }
       },

       

       

      The "Version 4.0.0-rc (January 30, 2019)" changelog is referencing the following:

      •    Stop bloating build.xml files with BuildData (JENKINS-19022)

      Perhaps that's related to the issue.

       

       

            Unassigned Unassigned
            tomdev Tom de Vries
            Votes:
            4 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: