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?
4
-
just create other deploy_configuration with artifact dependency, which will deploy your appSenior Pomidor– Senior Pomidor2018-02-06 13:14:27 +00:00Commented Feb 6, 2018 at 13:14
-
@SeniorPomidor could please explain me how to do that(any example link will do). I am new to Teamcity and not sure how to do it correctly.programoholic– programoholic2018-02-06 13:36:52 +00:00Commented Feb 6, 2018 at 13:36
-
TeamCity has build artifacts feature. can you use it? I don't understand what is serverurl.com, I can explain with TeamCity artifact dependency if you wantSenior Pomidor– Senior Pomidor2018-02-06 14:00:45 +00:00Commented Feb 6, 2018 at 14:00
-
Actually "www.serverurl.com" is the URL where the build package needs to be copied or uploaded.programoholic– programoholic2018-02-06 16:25:06 +00:00Commented Feb 6, 2018 at 16:25
Add a comment
|
1 Answer
TeamCity contains an integrated lightweight builds artifact repository. Since TeamCity 2017.1 it is possible to add an external storage for TeamCity artifacts.
- Create Build configuration which build your project and got some application for install. (E.g.
ng build) - publish all needed files to TeamCity ( General Settings -> Artifact paths: )
- 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. - 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
1 Comment
programoholic
Thank You so much. It helped me to understand my requirement and Teamcity more clearly . Although i transferred The build files using gulp script.