【发布时间】:2019-07-09 17:40:22
【问题描述】:
使用 Azure DevOps YAML 任务“Invoke-HTTP”,我不断得到
Exception message 'Exception Message: Invalid JavaScript property identifier character: -. Path '', line 1, position 8. (type JsonReaderException)'
这是任务的文档:
脚本如下:
jobs:
# Publish resource group artifact
- job: invoke_http_for_ase
pool: server
continueOnError: true
steps:
# Invoke REST API
# Invoke a REST API as a part of your pipeline.
- task: InvokeRESTAPI@1
displayName: 'GET Member'
inputs:
connectionType: 'connectedServiceNameARM'
azureServiceConnection: 'ARM-Service-Connection'
method: 'GET'
headers: '{Content-Type:application/json}'
urlSuffix: "subscriptions/xxx/resourceGroups/xxx?api-version=2018-05-01"
waitForCompletion: 'true'
设计师在发布管道中的发布任务也同样有效。
【问题讨论】:
-
那是哪个角色?还是你不知道?
-
我怀疑参数:azureServiceConnection,尝试不带特殊字符..
标签: azure-devops yaml