问题
I'm trying to setup my build defintion with yaml.
I'm using the AppCenterDistribute task. It requires and endpoint to MS App Center. I've setup one as per this tutorial.
However, I got that error message:
"Step input serverEndpoint references endpoint App Center which could not be found. The service endpoint does not exist or has not been authorized for use."
"App Center" is the name of the endpoint that I've setup in VSTS. Here the task in yaml:
- task: AppCenterDistribute@0
displayName: 'iOS Deployment'
inputs:
serverEndpoint: 'App Center'
appSlug: 'myname/myapp'
appFile: ''#path to ipa
symbolsDsymFiles: ''#path to dsym zip
symbolsIncludeParentDirectory: false
releaseNotesInput: 'release notes'
The endpoint exists (see screenshot below)
And if I create a "Build Definition" manually (i.e without yaml) then that endpoint is available in the drop down (see below).
Btw, to generate my yaml, I create a playground build definition on the portal that I don't save and there is "View Yaml" button on the top right corner. See below.
回答1:
You should add your App Center as an endpoint in VSTS firstly.
If you didn’t add your App Center in VSTS before, you can click the New button in App Center Distribute task. Then input connection name and the App Center Api token.
And select the endpoint connection in App Center Distribute task. After specifying App Slug and release notes etc, you can queue your build.
More details, you can refer Deploy VSTS Builds with App Center.
回答2:
The issue was that I created the 'App Center' endpoint in a different project in vsts than the one for the yaml build definition. Hence vsts was rightfully complaining that that endpoint could not be found.
来源:https://stackoverflow.com/questions/49123590/vsts-app-center-yaml-endpoint-could-not-be-found