Skip to content

CI Build Process

JamieB edited this page Jun 20, 2018 · 3 revisions

In order to build the project, team city runs a series of steps. The first step installs node js, the second builds the assets by executing the script build-tc. Finally, the third step compiles the Scala code, packages the frontend and backend, and uploads this to riff-raff ready to be deployed. All these steps are defined in build.sbt.

Building assets

Our build process uses npm scripts as a orchestrator tool for assets. The available scripts are defined in the package.json. Those scripts, depending on what they are trying to achieve, use other tools like webpack, sass, babel, eslint etc.

As an example, in order to build the assets for production, the step build-prod should be run. This script runs:

  1. clean - Deletes the previous compiled assets.
  2. validate - Validates the javascript source code by running lint for style check and flow type check.
  3. test - Runs the javascript tests using jest.
  4. webpack - Runs webpack in production mode. Webpack runs the following series of processes:
  • babel - Transpiles the javascript and jsx files, generating browser-compatible JavaScript.
  • uglify - Minifies and compresses the javascript. Additionally, it generates the source maps that are going to be used by Sentry.
  • asset hashing - Since the site has a caching layer sitting in front of it, we append a hash to the name of the asset in order to invalidate the cache every time we make a release of the site.

πŸ™‹β€β™€οΈ General Information

🎨 Client-side 101

βš›οΈ React+Redux

πŸ’° Payment methods

πŸŽ› Deployment & Testing

πŸ“Š AB Testing

🚧 Helper Components

πŸ“š Other Reference

1️⃣ Quickstarts

πŸ›€οΈ Tracking

Clone this wiki locally