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

Git plugin should populate 'scmName' property in api output

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      I marked this as an improvement instead of a bug because I am not sure if 'scmName' is designed to show the information I'm looking for.

      I am trying to figure out how best to do custom build tags for multi-repo builds, based on some internal business rules we have for tag name and content. One thing I noticed while looking at build results through the API is that the 'scmName' property under 'buildsByBranchName' is not populated, even if I give each repo a name under advanced, or have 'unique scm name' selected in my job config. This is true w/ both the multi-scm config and when using the git plugin directly, so I think it's a git plugin 'issue'.

      I think it would be easier to match output to repo if the scmName property reflected the custom name I put in the job config. Or if another property displayed that information. See below for an example of what I'm looking at.

      {
      "buildsByBranchName" : {
      "rel1.00" : {
      "buildNumber" : 38,
      "buildResult" : null,
      "marked" : {
      "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad",
      "branch" : [

      { "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad", "name" : "rel1.00" }

      ]
      },
      "revision" : {
      "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad",
      "branch" : [

      { "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad", "name" : "rel1.00" }

      ]
      }
      }
      },
      "lastBuiltRevision" : {
      "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad",
      "branch" : [

      { "SHA1" : "34e051320e481dd2b8a175d36ef5a2dd5d3fa5ad", "name" : "rel1.00" }

      ]
      },
      "remoteUrls" : [
      "ssh://user@git.company.com/project.git"
      ],
      "scmName" : ""
      },

            Unassigned Unassigned
            wsaxon Will Saxon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: