-
Notifications
You must be signed in to change notification settings - Fork 4
/
orb.yml
112 lines (108 loc) · 3.7 KB
/
orb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: 2.1
description: Send webpack bundle stats to packtracker for analysis.
display:
source_url: https://github.com/packtracker/report
home_url: https://packtracker.io/
executors:
reporter:
resource_class: << parameters.selected_resource_class >>
docker:
- image: packtracker/report:2.3.0
parameters:
selected_resource_class:
description: Resource class to be used for the executor
type: enum
default: medium
enum: [small, medium, medium+, large, xlarge, 2xlarge, 2xlarge+]
jobs:
report:
description: |
This job reports your webpack bundle stats to the packtracker.io service.
For this job to be able to authenticate with the packtracker service, you must additionally
add the `PT_PROJECT_TOKEN` environment variable to your CircleCI project configuration.
The project token can be found in the packtracker project settings.
parameters:
selected_resource_class:
description: Resource class to be used for the executor
type: enum
default: medium
enum: [small, medium, medium+, large, xlarge, 2xlarge, 2xlarge+]
project_root:
description: The path to the directory containing your package.json
type: string
default: ""
webpack_config:
description: The path to your webpack configuration file (if present)
type: string
default: "./webpack.config.js"
exclude_assets:
description: Compiled as RegExp and passed as the [excludeAssets configuration in the webpack stats config](https://webpack.js.org/configuration/stats/#stats) (only available to webpack version 3.5.0+)
type: string
default: ""
environment:
PT_EXCLUDE_ASSETS: << parameters.exclude_assets >>
PT_PROJECT_ROOT: << parameters.project_root >>
WEBPACK_CONFIG_PATH: << parameters.webpack_config >>
executor:
name: reporter
selected_resource_class: << parameters.selected_resource_class >>
steps:
- checkout
- run:
name: "Reporting to packtracker.io"
command: /entrypoint.sh
examples:
simple:
description: Simplest use case, leveraging default webpack config location and root project path.
usage:
version: 2.1
orbs:
packtracker: packtracker/[email protected]
workflows:
packtracker:
jobs:
- packtracker/report
custom_webpack_config_path:
description: Custom webpack config location (for example Ruby on Rails).
usage:
version: 2.1
orbs:
packtracker: packtracker/[email protected]
workflows:
packtracker:
jobs:
- packtracker/report:
webpack_config: "./config/webpack/production.js"
custom_nested_config_path:
description: Custom project path, useful for monorepo situations.
usage:
version: 2.1
orbs:
packtracker: packtracker/[email protected]
workflows:
packtracker:
jobs:
- packtracker/report:
project_root: "./packages/internal_package"
custom_resource_class:
description: Custom resource class if your build is running out of memory.
usage:
version: 2.1
orbs:
packtracker: packtracker/[email protected]
workflows:
packtracker:
jobs:
- packtracker/report:
selected_resource_class: medium+
exclude_some_assets_from_reporting:
description: Excluding specific assets with `main` or `pack` in their name.
usage:
version: 2.1
orbs:
packtracker: packtracker/[email protected]
workflows:
packtracker:
jobs:
- packtracker/report:
exclude_assets: "main|pack"