【问题标题】:Deploying Team City Builds with Visual Studio Team Services via REST通过 REST 使用 Visual Studio Team Services 部署 Team City 构建
【发布时间】:2017-12-14 20:59:36
【问题描述】:

我们最近实施了 Team City,我的任务是让它与我们现有的 VSTS 环境一起工作。理想情况下,我们希望有 Team City 构建和 VSTS 版本。我们已经将 Team City 生成的工件放在 VSTS 中,但是您不能按照此处的本文触发 CI 关闭它们; https://www.visualstudio.com/en-us/docs/build/concepts/definitions/release/artifacts

我想做的是让 Team City 通过 VSTS REST API 触发发布。我已按照https://www.visualstudio.com/en-us/docs/integrate/api/rm/releases 此处的文档进行操作,但在让 VSTS 使用 Team City 工件时遇到问题。无论我尝试什么,我都会收到以下错误:“VS402962:没有指定与工件源'TeamCity Build'相对应的工件版本ID。指定一个有效值并重试。”

这就是我的 REST 调用的 JSON 主体的样子:

{
  "definitionId": 13,
  "description": "Build from TeamCity",
  "artifacts": [
    {
      "alias": "Build Dev (TeamCity)",
      "instanceReference": {
        "id": 160,
        "name": "160"
      }
    }
  ]
}

根据这个问题,我已经尝试过使用和不使用名称:VS402881: No artifact version is specified corresponding to artifact source 'MyBuild.' Release Management vNext REST API,但我没有任何运气。

【问题讨论】:

    标签: teamcity azure-devops


    【解决方案1】:

    我找到了问题。您需要从别名中删除 (Team City),因为它不是 Artifact Alias 的一部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-11
      • 1970-01-01
      • 2013-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多