Skip to content

Commit 7c3a50d

Browse files
author
Arindam Bose
authored
Fix CI for external contributors (#11008)
* lazy mbx-ci installation * move check bundle size to separate job * derp * Remove prepare requirement from install mbxci * ensure ssh key is passed along from prepare * Revert "Remove prepare requirement from install mbxci" This reverts commit 3e85e9e. * Remove tags filter from install mbx-ci job * Fix branch name detection
1 parent 401ea18 commit 7c3a50d

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

.circleci/config.yml

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ workflows:
1111
filters:
1212
tags:
1313
only: /.*/
14+
- install-mbx-ci:
15+
requires:
16+
- prepare
17+
filters:
18+
branches:
19+
ignore: /pull\/[0-9]*/
1420
- lint:
1521
requires:
1622
- prepare
@@ -23,6 +29,14 @@ workflows:
2329
filters:
2430
tags:
2531
only: /.*/
32+
- check-bundle-size:
33+
requires:
34+
- prepare
35+
- install-mbx-ci
36+
- build
37+
filters:
38+
tags:
39+
only: /.*/
2640
- test-flow:
2741
requires:
2842
- prepare
@@ -74,13 +88,15 @@ workflows:
7488
- collect-stats:
7589
requires:
7690
- build
91+
- install-mbx-ci
7792
filters:
7893
tags:
7994
ignore: /.*/
8095
branches:
8196
only: main
8297
- deploy-benchmarks:
8398
requires:
99+
- install-mbx-ci
84100
- lint
85101
- build
86102
- test-flow
@@ -98,6 +114,7 @@ workflows:
98114
- /release-.*/
99115
- deploy-release:
100116
requires:
117+
- install-mbx-ci
101118
- lint
102119
- build
103120
- test-flow
@@ -123,12 +140,6 @@ jobs:
123140
<<: *defaults
124141
steps:
125142
- checkout
126-
- run:
127-
name: Install mbx-ci
128-
command: |
129-
curl -Ls https://mapbox-release-engineering.s3.amazonaws.com/mbx-ci/latest/mbx-ci-linux-amd64 > ~/mbx-ci &&
130-
chmod 755 ~/mbx-ci &&
131-
~/mbx-ci aws setup
132143
- restore_cache:
133144
keys:
134145
- v4-yarn-{{ checksum "yarn.lock" }}
@@ -143,10 +154,23 @@ jobs:
143154
paths:
144155
- mapbox-gl-js
145156
- .ssh
157+
158+
install-mbx-ci:
159+
<<: *defaults
160+
steps:
161+
- run:
162+
name: Install mbx-ci
163+
command: |
164+
curl -Ls https://mapbox-release-engineering.s3.amazonaws.com/mbx-ci/latest/mbx-ci-linux-amd64 > ~/mbx-ci &&
165+
chmod 755 ~/mbx-ci &&
166+
~/mbx-ci aws setup
167+
- persist_to_workspace:
168+
root: ~/
169+
paths:
170+
- .ssh
146171
- .aws
147172
- mbx-ci
148173

149-
150174
lint:
151175
<<: *defaults
152176
steps:
@@ -176,10 +200,6 @@ jobs:
176200
- run: yarn run build-style-spec
177201
- run: yarn run build-flow-types
178202
- run: yarn run test-build
179-
- run:
180-
name: Check bundle size
181-
command: |
182-
node build/check-bundle-size.js
183203
- store_artifacts:
184204
path: "dist"
185205
- store_artifacts:
@@ -189,6 +209,16 @@ jobs:
189209
paths:
190210
- mapbox-gl-js/dist
191211

212+
check-bundle-size:
213+
<<: *defaults
214+
steps:
215+
- attach_workspace:
216+
at: ~/
217+
- run:
218+
name: Check bundle size
219+
command: |
220+
node build/check-bundle-size.js
221+
192222
test-flow:
193223
<<: *defaults
194224
steps:

0 commit comments

Comments
 (0)