VSTS Rest API - 创建发布 [英] VSTS Rest API - Create Release

查看:28
本文介绍了VSTS Rest API - 创建发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想利用此处定义的 VSTS Rest API 开始发布:

然后您可以在

有关更多信息,请参阅此处的帖子.

I'd like to start a release leveraging the VSTS Rest API defined here: https://www.visualstudio.com/en-us/docs/integrate/api/rm/releases#create-a-release

but I need to set some of the variable values when I create the release. Looking at the ReleaseMetadata (https://www.visualstudio.com/en-us/docs/integrate/api/rm/contracts#ReleaseStartMetadata) I see there is a properties collection. Is this where I'd set the variable values? Is there any special naming convention I need to use in the property name to translate it the variable name? (like ##VSTS:[])??

解决方案

Now you can define VSTS Release variables to be "Settable at release time" as shown below.

Then you can use below json syntax in VSTS REST API call request body to pass the variable values to set at the time of creating the release.

"variables": {
    "Variable1Name": {
      "value": "Variable1Value"
    },
    "Variable2Name": {
      "value": "Variable2Value"
    }
  }

For more information refer the post here.

这篇关于VSTS Rest API - 创建发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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