If you do not want to build the pipeline because all you are changing is the README.md
file, us [ci skip]
in the commit message.
- Any pushed commit gets built (
npm run-script build
) - Any successful build of
develop
branch deploys the pattern library to Staging: http://style-staging.buildit.digital/ - Any successful build of
next
branch deploys the pattern library to Next: http://style-next.buildit.digital/ - Any successful build of
master
branch:- runs
semantic-release
, which publishes NPM packages and commits updated changelogs and tags back to the git repo - deploys the pattern library Production: http://style.buildit.digital/
- deploys the UI library files to CDN: https://static.buildit.digital/gravity-ui-web/
- runs
Travis CI build expects the following environment variables:
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
: AWS credentials used for deployingSTAGING_BUCKET
andSTAGING_BUCKET_REGION
: S3 bucket and Region for Staging environmentPROD_BUCKET
andPROD_BUCKET_REGION
: S3 bucket and Region for Production environment
Verify you have ruby version > 1.9.3:
> ruby -v
> ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
Install the Travis CI CLI:
> gem install travis -v 1.8.8 --no-rdoc --no-ri
NOTE: It may be necessary to have XCode CLI if working on a Mac
> xcode-select --install
Edit your .travis.yml
file to have a deploy provider:
- provider: npm
email: <BUILDIT_NPM_USER_EMAIL_ADDRESS>
api_key:
secure: <ENCRYPTED_NPM_AUTH_TOKEN> (*)
on:
repo: <GIT_REPO_NAME> (e.g. buildit/buildit for the Buildit Website)
branch: <TARGETED_BRANCH>
tags: <TRUE_OR_FALSE> (Whether to build on Tags)
condition: <CONDITION_TO_ACTIVATE_ON> (i.e. a regex)
...<ANY_OTHER_OPTIONS>...
* Generated using Travis-CI CLI, read below or click see here
Travis needs to have access to the Buildit NPM account to be able to push the new artefacts to the NPM registry. As this is a public project it was decided to use a generic user account on NPM. The API key is then generated and linked to this account.
NOTE: To generate or protect the API key, it is required to have the Travis-CI CLI tool installed. Please see above for details.
You must be logged-in on your NPM CLI instance in order to link your CLI environment to your remote Buildit NPM account. The following command will update your .npmrc file in your personal home directory once you have entered in all the security information:
> npm login
After successful log on, navigate to your npmrc file (e.g. on a mac /Users/<user>/.npmrc
), to retrieve the generated API key for the next steps.
You must be logged-in on the Travis-CI CLI in order to link your CLI environment to your remote Travis-CI.org account:
> travis login --auto
Run the following command to encrypt the NPM API key:
> travis encrypt <API_KEY> -r buildit/gravity-ui-web --org
NOTE: Do not use the
--add env.global
or any other permutation to thetravis encrypt
command, as it may overwrite other variables in your .travis.yml file.
Currently, deployment only means synchronising the output of the build with an S3 bucket.
S3 buckets and DNS have to be set up manually.