我正在尝试使用Flow使管道排队。
管道具有以下参数:
# Pipeline Trigger
trigger:
- none
# Use parameters as input options
parameters:
- name: location
displayName: Location?
type: string
values:
- australiaeast
- uksouth
- eastus
- westus2
- southeastasia
流程:
我得到一个错误:
Could not queue the build because there were validation errors or warnings.
Azure DevOps ActivityId: <id>
Details: {"ClassName":"Microsoft.TeamFoundation.Build.WebApi.BuildRequestValidationFailedException","Message":"Could not queue the build because there were validation errors or warnings.","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":null,"HResult":-2146232832,"Source":null,"WatsonBuckets":null,"m_logException":false,"m_reportException":false,"m_errorCode":0,"m_logLevel":"warning","m_eventId":3000,"ValidationResults":[{"result":"error","message":"A value for the 'location' parameter must be provided."}
JSON应该没问题。是否打算以此方式工作?要将参数传递给管道参数?
答案 0 :(得分:1)
您的参数应采用以下格式:
[
{
"location":"australiaeast"
}
]
答案 1 :(得分:0)
实际上,
[
{
"location":"australiaeast"
}
]
给我“错误的网关”
这确实有效:
{
"location":"uksouth"
}
问题是其他一些参数没有在管道中设置默认值。给他们提供默认值后,我就可以传递参数了。