Building an Angular CLI project in Teamcity

Objectives

We should be able to lint, test, and build anAngular in Teamcity. Our final build steps in Teamcity will be:

Image for post

Prerequisites

  • Node installed
  • Teamcity installed

Steps

Linting

Image for post

Testing

Add the following to package.

In your Karma.config

  • Add a requirement on puppeteer.
  • Add the karma-teamcity-reporter plugin.
  • Switch the browser run in to ChromeHeadless
Image for post
Karma.config

Add the following script to your package.json

Image for post
Package.json

And finally, add the teamcity build step!

Image for post

Building

Image for post

Written by

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store