- Head over to CircleCI - If you have a github account linked to P'unk Ave, you'll have the same permissions to access repos in the Circle UI
- Click the
Set Up Project
button for the repo you want to set up. This will tell you to add aconfig.yml
file for your project in a.circleci
folder. An example of this config can be found in our Client boilerplate. - Once the config is committed and pushed, click the
Start Building
button back in the Circle UI. - Builds will happen on push.
- Click the gear icon on the project page that you want to set up a badge for
ex: https://circleci.com/gh/punkave/MYPROJECT
. - Click the
Status Badges
link underNotifications
in theProject Settings
side menu. - Select what branch you want to generate a badge for (usually master).
- Generate an API token by following the
add one with status scope
link underAPI Token
and clicking theCreate Token
button. You can label it whatever you like (Status
or something similar is probably apt). - Go back to the
Status Badges
page and copy the embed code markdown and add it to your project readme.
Occasionally, you may see an error on a build such as:
sh: 1: concurrently: Permission denied
This, or any permission denied error is likely a caching error (the vm user is different than cached version of npm dependencies).
To remedy this, you have to clear the npm cache. There are two ways to do this:
- Update something in package json
- Better option: update env variable in circle
See client-boilerplate
for circle related config. In order to use a cache version number (CACHE_VERSION
), that variable must be set in the CircleCI UI project level.