Skip to content
This repository has been archived by the owner. It is now read-only.

Automatically create production build via CI #170

Merged
merged 4 commits into from Jun 14, 2017
Merged

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Jun 13, 2017

After merging this pull request, any Travis pull request targeting master will automatically build the JS/CSS on the CI server and commit the changes. This means that we don't have to manually run and commit the compiled artifacts anymore.

Here is a sample auto-build commit summary:

From 35a5d12763704d29acc94b449f3ff99ae16d3e08 Mon Sep 17 00:00:00 2001
From: Travis CI <travis@travis-ci.org>
Date: Tue, 13 Jun 2017 10:33:02 +0000
Subject: Travis build: 30

https://travis-ci.org/CatalystCode/ibex-dashboard/builds/242364464
---
 build/asset-manifest.json                                      | 4 ++--
 build/index.html                                               | 2 +-
 build/static/js/{main.d9fdb0ac.js => main.e51637f1.js}         | 2 +-
 build/static/js/{main.d9fdb0ac.js.map => main.e51637f1.js.map} | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
 rename build/static/js/{main.d9fdb0ac.js => main.e51637f1.js} (99%)
 rename build/static/js/{main.d9fdb0ac.js.map => main.e51637f1.js.map} (68%)

Here is a sample build that executed the auto-build travis-ci/242364464 and some of the auto-build logs for reference

image

Note that in order to push the auto-build commit, the Travis machine authenticates with Github via an access token. Currently, this is a token associated with my personal Github account. After merging this pull request, an administrator of ibex-dashboard should create a new access token (here) and then set this token as a secure environment variable in Travis (here).

@c-w c-w requested a review from morsh Jun 13, 2017
@c-w
Copy link
Contributor Author

@c-w c-w commented Jun 13, 2017

This PR now also adds a code coverage check.

image

The minimum code coverage can be specified in .travis/coverage.sh or in the Travis CI dashboard by setting the MIN_COVERAGE environment variable. The implementation is a bit of a hack, namely we're parsing the react-scripts-ts output via GNU tools... however this is unfortunately unavoidable because there are several bugs in the pipeline between react-scripts-ts and the underlying jest that mean that neither a jest configuration in the package.json or a file-based config are respected.

Sample build: travis-ci/242455279.

@morsh morsh merged commit 83bd12d into ibex-version-1.0 Jun 14, 2017
2 checks passed
@c-w c-w deleted the ci-build-deploy branch Jun 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants