1

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 app Commented 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. Commented 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 want Commented Feb 6, 2018 at 14:00
  • Actually "www.serverurl.com" is the URL where the build package needs to be copied or uploaded. Commented Feb 6, 2018 at 16:25

1 Answer 1

2

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 enter image description 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

Sign up to request clarification or add additional context in comments.

1 Comment

Thank You so much. It helped me to understand my requirement and Teamcity more clearly . Although i transferred The build files using gulp script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.