How to deploy Angular 4 App using Teamcity ?

别来无恙 提交于 2020-01-24 20:49:12

问题


I am using TeamCity for CI and build for my Angular App. As of now i have configured the project such that On each commit the build is triggering and generating the package successfully. Now i have requirement that on each successful build, the generated build package should get deployed on a server(we call it artifacts(e.g: https://serverurl.com). Can anybody please guide how to configure my project to achieve this?


回答1:


TeamCity contains an integrated lightweight builds artifact repository. Since TeamCity 2017.1 it is possible to add an external storage for TeamCity artifacts.

  1. Create Build configuration which build your project and got some application for install. (E.g. ng build )
  2. publish all needed files to TeamCity ( General Settings -> Artifact paths: )
  3. Create Deploy configuration for install your app.
    a. install on the system, where teamcity-agent is located b. install to another system via ssh or etc.
  4. Add artifact and snapshot dependencies. The Build Configuration Settings | Dependencies page, Artifact Dependencies section allows configuring the dependencies. More here

Now you can get build artifacts for install. And when you run Deploy configuration, you able to select commit or specific dependence.

Look at Snapshot dependency parameters. You have to select Do not run new build if there is a suitable one and Only use successful builds from suitable ones, then when your build was failed, then deploy will not run



来源:https://stackoverflow.com/questions/48639738/how-to-deploy-angular-4-app-using-teamcity

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