Configure For TravisCI

Configuration

To configure a project for TravisCI you need to run the BuildBasis TravisCI reporter script.

Prerequisite:

Configuring any project to report data to BuildBasis requires an API key. You can view your organization’s API key in the BuildBasis Dashboard API Page.

Steps:

1.) Set a BUILDBASIS_API_KEY environment variable in TravisCI to an api key from your BuildBasis dashboard.

2.) Open your .travis.yml file.

3.) Add the following content within the before_script section:

before_script:
- curl https://api.buildbasis.com/api/v1/download-reporter?platform=travis --output buildbasis.sh
- chmod +x buildbasis.sh
- ./buildbasis.sh start

4.) Then add the following content within the after_script section:

after_script:
- ./buildbasis.sh

5.) Run a pipeline and the project will be viewable within BuildBasis.

A complete example:

language: node_js
node_js:
 - "node"
before_script:
- curl https://api.buildbasis.com/api/v1/download-reporter?platform=travis --output buildbasis.sh
- chmod +x buildbasis.sh
- ./buildbasis.sh start
script:
- yarn install
- yarn test
after_script:
- ./buildbasis.sh