Next, you will add our orb to your configuration by declaring it in your CircleCI configuration.
version: 2.1orbs:packtracker: email@example.com
In order for us to know what project you are reporting stats for, you must send along your packtracker project token. To do this with the CircleCI Orb, you must create a new project environment variable in your CircleCI settings called
PT_PROJECT_TOKEN. You can find your packtracker project token in your project's settings.
Now that you've declared our orb for use and added your project token, you have access to our
report job. You can put this job anywhere inside your existing CircleCI workflows.
workflows:version: 2your_existing_workflow:jobs:- build- packtracker/report
Or, create a new workflow to run packtracker reporting.
workflows:version: 2your_existing_workflow:jobs:- buildpacktracker:jobs:- packtracker/report
By default, this base configuration should just work most of the time. If you have a non-standard setup, you can tweak the job with the following 2 optional parameters.
The relative path to the directory containing the
The relative path to your webpack configuration. By default, it looks in the root directory for
Sometimes your Orb might not have enough resources to complete your webpack build, and you might need to specify a higher resource class.
There may be assets you wish to exclude from tracking. This options allows you to pass a regular expression string. When this regular expression matches the name of any asset you are producing, it will exclude it from reporting. This simply gets passed along to the webpack stats configuration.
For example, a Ruby on Rails project might look something like this.
workflows:packtracker:jobs:- packtracker/report:webpack_config: "./config/webpack/production.js"