您好我创建了一个服务端点,读取此VSTS Service EndPoint Tutorial并成功创建。 当我看到jenkins端点时,它有一个验证链接来验证端点 我谷歌太多的样本,但没有相关的信息。任何人都可以帮助实现这一目标。
答案 0 :(得分:2)
您需要在vss-extension.json文件中添加带有TestConnection名称的数据源,例如:
{
"id": "service-endpoint",
"description": "Service Endpoint type for Fabrikam connections",
"type": "ms.vss-endpoint.service-endpoint-type",
"targets": [ "ms.vss-endpoint.endpoint-types" ],
"properties": {
"name": "fabrikam",
"displayName": "Fabrikam server connection",
"url": {
"displayName": "Server Url",
"helpText": "Url for the Fabrikam server to connect to."
},
"dataSources": [
{
"name": "TestConnection",
"endpointUrl": "{{endpoint.url}}api/projects/index",
"resultSelector": "jsonpath:$[*].nm"
},
{
"name": "Fabrikam Projects",
"endpointUrl": "{{endpoint.url}}api/projects/index",
"resultSelector": "jsonpath:$[*].nm"
}
],
"authenticationSchemes": [
{
"type": "ms.vss-endpoint.endpoint-auth-scheme-token"
},
{
"type": "ms.vss-endpoint.endpoint-auth-scheme-basic",
"inputDescriptors": [
{
"id": "username",
"name": "Username",
"description": "Username",
"inputMode": "textbox",
"validation": {
"isRequired": false,
"dataType": "string"
}
},
{
"id": "password",
"name": "Password",
"description": "Password",
"inputMode": "passwordbox",
"isConfidential": true,
"validation": {
"isRequired": false,
"dataType": "string"
}
}
]
}
],
"helpMarkDown": "<a href=\"url-to-documentation\" target=\"_blank\"><b>Learn More</b></a>"
}
}