使用API​​创建发布定义时出错。 [英] Error when using API to create release definition.

查看:102
本文介绍了使用API​​创建发布定义时出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我们目前有TFS 2017现场,我遇到了一个我无法解决的错误。任何帮助,将不胜感激。以前,在TFS 2015中,我们有一个PowerShell脚本,可以从一个项目中获取发布定义,并使用该定义在另一个项目中创建
新版本定义。现在,当脚本运行时,将抛出错误,如下所示:

We currently have TFS 2017 on prem and I'm running into an error I cannot solve. Any help would be appreciated. Previously, with TFS 2015, we had a PowerShell script that would grab a release definition from one project and use the definition to create a new release definition in another project. Now when the script is run an error is being thrown as follows:

Invoke-RestMethod : {"$id":"1","innerException":null,"message":"No agent queue found with identifier 
4.","typeName":"Microsoft.TeamFoundation.DistributedTask.WebApi.TaskAgentQueueNotFoundException, 
Microsoft.TeamFoundation.DistributedTask.WebApi","typeKey":"TaskAgentQueueNotFoundException","errorCode":0,"eventId":3000}

它看起来像在环境中发布现在有"代理队列" (没注意到2015年)。我们是否可以不再使用API​​来创建发布定义,或者我还缺少其他内容。我一直在查看最近的
版本的API文档,我找不到它。

It looks like in the Environments for releases there are now "Agent Queues" (didn't notice that in 2015). Can we no longer use the API to create release definitions or is there something else I'm missing here. I've been looking at the most recent version of the API doc I can find to no avail.

感谢您的帮助!

推荐答案

嗨Fred Szelag,

Hi Fred Szelag,

请检查你的


body Json是否正确创建新的发布定义。您可以写出
body Json is correct for create new release definition. You could write out the


body  JSON,并尝试在" PostMan "。
body JSON, and try to test it in "PostMan".

根据错误消息,QueueId不适用于新定义。

According to the error message, QueueId is not available for the new definition.

最好的问候


这篇关于使用API​​创建发布定义时出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆