CI Build Schematics
This repository contains a Schematics that adds integration for a continuous integration build.
Prerequisite
Install the Angular CLI by running
npm install -g @angular/cli
Usage
From within your Angular project run
ng add @ibm-wch-sdk/ci-build
This will install the required npm dependencies and will modify your source files to support continuous integration.
Oslo Projects
The script adds build:ci
and deploy:ci
commands that dispatch to the standard Oslo commands.
Non-Oslo Projects
The script adds build:ci
and deploy:ci
commands that are based on the ibm-wch-sdk-cli.
Travis
Per default the script generates a .travis.yml
file. This will cause a build to be executed each time the git repo changes. A subsequent deployment step will only be triggered for tagged commits.
Travis Setup
In your Travis CI setup define the following environment properties:
-
ibm_wch_sdk_cli_username
: your username used to push updates to WCH via wchtools. -
ibm_wch_sdk_cli_password
: your password used to push updates to WCH via wchtools. Make sure to configure this property as a "secure property" in Travis CI. -
ibm_wch_sdk_cli_url
: the API URL to your tenant, unless you configured the build to read it from.wchtoolsoptions.json
.
Note For Oslo based projects make sure that the URL configured in ibm_wch_sdk_cli_url
matches the information in the src/app/Constants.ts
file.