how to add the on premise TeamCity service endpoint successfully in VSTS?

好久不见. 提交于 2019-12-24 17:07:19

问题


I am trying to create the release steps for SSDT project in VSTS but the build artifacts are available in TeamCity. For that I installed TeamCity artifacts for Release Management extension in VSTS.

After installed above extension in VSTS, then I am trying to link the build artifacts to release configuration. so, I tried to configure the TeamCity endpoint and verifying the connection to the TeamCity. Then I got the error like below screenshot.

Next I tried to add the build artifacts in VSTS release creation from TeamCity like shown in below screenshot. But in that no projects and build configuration are appeared in the dropdown list.

So, can anyone tell me how to resolve the above error as soon as possible?


回答1:


You can only solve that error message by ensuring that your TeamCity server is addressable from the internet (e.g. has a proper domain name, ssl certificate and exposed through the firewall). That way VSTS can check with the TeamCity server what data to show here.

  • Configure the server URL.
  • Configure SSL (client certificate authentication is not supported by VSTS).
  • Be sure to check the security of your Team City Server, don't expose it lightly, as Team City agents will be able to execute code on your servers!

But you do not have to do this in order to use the endpoint. You can manually enter the right information and the agent that's running on-premise will be able to connect to Team City just fine. There will be no intellisense, no auto-complete and no validation.

You can use the VSTS Artefact variables to make sure other tasks know the correct path to where your files are stored. Alternatively, queue a release on a local agent and inspect the agent's work folder to see where files are being dropped.

Alternatively, you can let Team City publish to the VSTS Package Management repository so the artefacts are available as artefact source in VSTS. Unfortunately, there is no trigger support for package Management (yet?).

To list projects, versions and artefacts you need the following connections enabled in your firewall/configuration:

[VSTS] --- https ----> [Team City]

To have the agent pull the artefacts from Team City you need:

[VSTS] <--- https --- [VSTS Agent] --- http(s) ---> [Team City]

If your connection is localhost that means that the [VSTS Agent] and [Team City] must be the same machine. Since the agent will do a local loopback connection to connect to Team City.

[VSTS] <--- https --- [VSTS Agent] --- http(s) ---. 
                      [Team City]  <--------------|

VSTS doesn't support all authentication modes available in Team City. I suppose you'll need Basic Auth and/or Windows Auth for VSTS to be able to connect. You can't use SSL client certificates. Since VSTS must trust the Team City server you also need a proper SSL cert and can't use a self-signed certificate.

if you want to use a free certificate, you can use let's Encrypt to get a free cert for your server.



来源:https://stackoverflow.com/questions/46522832/how-to-add-the-on-premise-teamcity-service-endpoint-successfully-in-vsts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!