-
Bug
-
Resolution: Done
-
Minor
-
None
-
Jenkins 1.611, TFS Plugin 3.1.1
Currently i'm trying to extract different informations from Jenkins builds via the REST API which works well for SVN, Git etc. but started with TFS i'm faced with the following problem.
If i take a look at the return of the REST API (json) on a SVN/Git build i got the following informations (excerpt):
"changeSet" : { "items" : [ { "affectedPaths" : [ "pom.xml" ], "commitId" : "aeda48c80cde155cee1dfe2f3d8fb275bf0e7aa0", "timestamp" : 1437760959000, "author" : { "absoluteUrl" : "http://ci.soebes.de:8080/user/khmarbaise", "fullName" : "khmarbaise" }, "comment" : "Fixed #3 Update to new mojo-parent\n", "date" : "2015-07-24T20:02:39+0200 +0200", "id" : "aeda48c80cde155cee1dfe2f3d8fb275bf0e7aa0", "msg" : "Fixed #3 Update to new mojo-parent", "paths" : [ { "editType" : "edit", "file" : "pom.xml" } ] } ], "kind" : "git" }, "culprits" : [ { "absoluteUrl" : "http://ci.soebes.de:8080/user/khmarbaise", "fullName" : "khmarbaise" } ],
I can identify the changeset by the kind which gives me "git" in this case. Furthermore i get the id of the commit in commitId (in this case the sha1).
If i use TFS i got the following:
{ "actions" : [ { "causes" : [ { "shortDescription" : "Started by an SCM change" } ] }, { }, { }, { }, { }, { }, { "changesetVersion" : 238562 }, { }, { "failCount" : 1, "skipCount" : 495, "totalCount" : 5551, "urlName" : "testReport" }, { }, { }, { }, { }, { } ], "artifacts" : [ ], "building" : false, "description" : null, "displayName" : "#6733", "duration" : 737816, "estimatedDuration" : 755648, "executor" : null, "fullDisplayName" : "build #6733", "id" : "6733", "keepLog" : false, "number" : 6733, "queueId" : 4136, "result" : "UNSTABLE", "timestamp" : 1438697651642, "url" : ".../build/6733/", "builtOn" : "", "changeSet" : { "items" : [ { "affectedPaths" : [ "$/....", ], "author" : { "absoluteUrl" : "....", "fullName" : "...." }, "commitId" : null, "msg" : "....", "timestamp" : -1, "comment" : ".....", "date" : 1438697593000, "domain" : null, "items" : [ { "action" : "delete", "editType" : "delete", "path" : "...." }, { "action" : "delete", "editType" : "delete", "path" : "...." }, { "action" : "edit", "editType" : "edit", "path" : "...." }, { "action" : "edit", "editType" : "edit", "path" : "...." }, { "action" : "delete", "editType" : "delete", "path" : "...." }, { "action" : "edit", "editType" : "edit", "path" : "...." }, { "action" : "edit", "editType" : "edit", "path" : "...." }, { "action" : "edit", "editType" : "edit", "path" : "...." } ], "user" : "name", "version" : "238562" } ], "kind" : null }, "culprits" : [ { "absoluteUrl" : "...", "fullName" : "fullname" }, { "absoluteUrl" : "...", "fullName" : "fullname" }, { "absoluteUrl" : "...", "fullName" : "fullname" }, { "absoluteUrl" : "...", "fullName" : "fullname" }, { "absoluteUrl" : "...", "fullName" : "fullname" } ], "mavenArtifacts" : { },
which does not contain the changeset number in commitid nor does it contain kind entry apart from that it also contains a supplemental entry action. But it does contain the changesetVersion in the list of actions where i would say it does not belong.