jenkins api 接口json 调用

来源:互联网 发布:vb清除窗体内容 编辑:程序博客网 时间:2024/05/21 10:56

{  "actions" : [    {      "causes" : [        {          "shortDescription" : "Started by user 10111065",          "userId" : "10111065",          "userName" : "10111065"        }      ]    },    {          },    {          }  ],  "artifacts" : [      ],  "building" : true,  "description" : null,  "displayName" : "#13",  "duration" : 0,  "estimatedDuration" : 703780,  "executor" : {      },  "fullDisplayName" : "ftis20171025 #13",  "id" : "13",  "keepLog" : false,  "number" : 13,  "queueId" : 34473,  "result" : "SUCCESS",  "timestamp" : 1508922176205,  "url" : "http://cd-jenkinsprd.service.cnsuning.com/jenkinsprd/job/ftis20171025/13/",  "builtOn" : "slave30 mesos",  "changeSet" : {    "items" : [          ],    "kind" : "svn",    "revisions" : [      {        "module" : "https://a.svncode.cnsuning.com/svn/JR_code/EPP/phonepadInterface/branches/ftis_V20171025",        "revision" : 36055      }    ]  },  "culprits" : [      ]}
这是原数据返回,如果已经构建结束,正在sonar 分析,那么返回的数据
building  字段是 true

但是result是 sucess.

如果正在构建中,单元测试或者编译 ,那么result是null,  building 是 true.    如果是失败,那么就是

FAILURE, building 是false.

如果sonar 分析也结束了,那么building是false,result还是编译,单元测试阶段的状态。

原创粉丝点击