是否有可能使用Rest API将变量组添加到Azure管道?
答案 0 :(得分:0)
是的,有一个Rest API用于添加变量组Variablegroups - Add:
POST https://dev.azure.com/{organization}/{project}/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
例如:
POST https://dev.azure.com/fabrikam/DGDemo/_apis/distributedtask/variablegroups?api-version=5.1-preview.1
身体:
{
"variables": {
"key1": {
"value": "value1"
},
"key2": {
"value": "value2",
"isSecret": true
}
},
"type": "Vsts",
"name": "TestVariableGroup1",
"description": "A test variable group"
}