完成从 Jenkins 管道在报告门户中创建的启动(构建后操作)

问题描述 投票:0回答:1

我已使用curl命令使用报告门户中的启动ID来完成启动,并尝试在bash中执行。要在詹金斯管道中使用它。

它返回: % 总计 % 已接收 % Xferd 平均速度 时间 时间 时间 当前 Dload 上传总花费左速度 0 0 0 0 0 0 0 0

卷曲命令:

curl -X GET -H“内容类型:application/json”-H“授权:Bearer API_Token”http://xxx.xx.xxx.xxx/:8080/api/v1/launch/701/finish

这个工作有效吗?或者语法上需要改变什么。

jenkins jenkins-pipeline jenkins-groovy reportportal
1个回答
0
投票

有专用的 API 端点用于完成:

这是您需要发送的有效负载示例:

{
  "attributes": [
    {
      "key": "string",
      "system": false,
      "value": "string"
    }
  ],
  "description": "string",
  "endTime": "2024-03-09T15:55:01.427Z",
  "status": "PASSED"
}

并非所有字段都是必填字段,请参阅位于 http://xxx.xx.xxx.xxx:8080/ui/#api 的 Swagger/OpenAPI 文档 请注意该方法是“PUT”。

© www.soinside.com 2019 - 2024. All rights reserved.