2

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."

enter image description here

"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)

enter image description here

And if I create a "Build Definition" manually (i.e without yaml) then that endpoint is available in the drop down (see below).

enter image description here

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.

enter image description here

Edward Brey
  • 40,302
  • 20
  • 199
  • 253
François
  • 3,164
  • 25
  • 58
  • Can you show the detail build logs by setting system.debug as true? Besides, does the API token has full access to app center? – Marina Liu Mar 06 '18 at 05:45
  • Yes full access. – François Mar 06 '18 at 05:51
  • Actually the error message appears even before the build definition runs. I'll add a screenshot. – François Mar 06 '18 at 05:57
  • Please refresh the connect in App Center Distribute task, and check if you can find the endpoint from drop down list (https://imgur.com/a/EIVu5). If the endpoint has been disconnected, it should show the error message as you listed (https://imgur.com/a/bPc09). – Marina Liu Mar 06 '18 at 06:13
  • There are no visual elements (and hence no "refresh" on the task) as I'm doing yaml. However, when I create a new definition manually, "App Center" is available in the drop down. – François Mar 06 '18 at 06:24
  • Yeah, you should make sure the drop down list has an available element at least. You can add App center endpoint by click the New button, and select it as connection. – Marina Liu Mar 06 '18 at 06:31
  • It is available. When I create a task manually (i.e without yaml) it is there. I'll add a screenshot. – François Mar 06 '18 at 06:37

3 Answers3

0

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.

enter image description here

enter image description here

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.

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
  • So the error shows only for YAML build defintion? You can check the content in .yml file by comparing the yaml in the manually added task (https://imgur.com/a/fEUux). – Marina Liu Mar 06 '18 at 07:07
  • And can you show the whole .yml file to queue your build? – Marina Liu Mar 06 '18 at 07:22
  • To create a yaml file, I create a new build definition manually on the portal (that I don't save, it's just a playground) and click on "View Yaml" on the top right corner. I'll add a screenshot. – François Mar 06 '18 at 07:33
  • I found the issue and updated the question. Thank you for your help. – François Mar 06 '18 at 07:52
  • Ok, you can add your update as an answer and accept it. – Marina Liu Mar 06 '18 at 07:55
  • I'm having this identical problem, except that I have read the answer and have verified that I have created the service endpoint in the correct project. – ossentoo May 31 '18 at 13:33
0

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.

François
  • 3,164
  • 25
  • 58
0

I actually had to change the name of the service connection from "Visual Studio App Center" to "VSAC". It didn't like the spaces in the name. Called it like this. serverEndpoint: 'VSAC'

Dumber_Texan2
  • 840
  • 2
  • 12
  • 34