-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
618 lines (605 loc) · 30.2 KB
/
bitbucket-pipelines.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# Note: This image can be found in build/pipelines/docker-image
image: atlassianlabs/atlaskit-mk-2:1.0.16
# This ensures we do a full clone on each build which prevents issues when cross referencing
# changesets and releases
clone:
depth: full
options:
size: 2x
pipelines:
branches:
master:
- step:
script:
# Note: in master, this script will rebase you onto latest origin/master.
- source ./build-setup.sh
- ([[ "$BITBUCKET_BRANCH" == "master" ]]) || (echo "This build should only be run on master" && exit 1)
- bolt install --frozen-lockfile
- (cd build/ci-scripts && yarn stop-if-older-build)
- yarn build
# Bump all packages and their dependents using saved changesets.
- yarn changeset bump
# We push the bumped packages to master now as it's much better to fail whilst BB is
# ahead of npm, than the other way round.
- git push
# We run the copy.version script again, because the versions in our package.jsons may have changed
# after the bump. We've kept it running in both places, just to limit the scope of this change
# so that we don't break anything that was working previously.
- ./build/ci-scripts/copy.version.js
# Because we distribute precompiled code for mobile, for version accuracy, it needs to be built after the bump.
# Unfortunately, we can't rely on `run.if.package.changed.js` here because it runs against the last commit,
# which contains our changeset bump rather than the actual changes.
- yarn build:editor-mobile-bridge
# Release all unreleased packages.
- yarn changeset release --public
- git push --tags # Push only the tags.
- (cd build/ci-scripts && yarn restart-stopped-build)
after-script:
- yarn send:buildEvents
caches:
- node
default:
- parallel:
- step:
name: Building dists
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
- node build/ci-scripts/run.if.package.changed.js @atlaskit/editor-mobile-bridge -- yarn build:editor-mobile-bridge
- export CHANGED_PACKAGES=$(node build/ci-scripts/get.changed.packages.since.master.js)
# Change into a glob pattern (removing brackets, spaces and quotes).
- export CHANGED_PACKAGES_GLOB=$(echo "$CHANGED_PACKAGES" | sed 's/[][" ]//g')
- node build/ci-scripts/branch-deploys/update.changed.packages.deps.to.cdn.js
# We add in the extra braces and a trailing comma in case we only have one package
- bolt ws exec --only-fs="{$CHANGED_PACKAGES_GLOB,}" -- npm pack
- mkdir -p dists/
- node build/ci-scripts/branch-deploys/copy.built.tgzs.to.dists.dir.js
- for file in dists/*; do node build/ci-scripts/upload.build.artefact.for.commit.js $file dists/; done
# Need to check that we definitely have a changeset present, error with a message if not
- yarn changeset status || (echo "\033[0;31m ~ Please run yarn changeset:empty to create an empty changeset ~" && false)
artifacts:
- dists/manifest.json
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Lint + Typecheck
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- node build/ci-scripts/run.tool.if.changed.js eslint -- yarn lint:eslint
- node build/ci-scripts/run.tool.if.changed.js stylelint -- yarn lint:stylelint
- node build/ci-scripts/run.tool.if.changed.js flow -- yarn typecheck:flow
- node build/ci-scripts/run.tool.if.changed.js typescript -- yarn typecheck:typescript
# Get the commit that we diverged from master at.
- export DIVERGED_AT=$(git merge-base master HEAD)
# Get a comma separated list of changed files.
- export CHANGED_FILES=$(git diff --name-only $DIVERGED_AT -- 'packages' 'build' 'website' | grep -E 'js$|ts$|tsx$' | tr '\n' ',')
# The below runs prettier over all changed files and fails if anyone of them don't match prettier's rules.
# We add fileMock.js to the list of files so that we never pass an empty list to prettier.
- yarn prettier --no-editorconfig "{$CHANGED_FILES,fileMock.js}" --list-different
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Check bundle sizes
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- bolt measure:dependents:s3
- node build/ci-scripts/merge.json.in.folder.js .currentBundleSize
- if [ -e ".currentBundleSize/merged.json" ]; then node build/ci-scripts/upload.build.artefact.for.commit.js .currentBundleSize/merged.json; fi
artifacts:
# Remove this adding for debugging
- .currentBundleSize/**
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Unit Testing
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:changed --maxWorkers=50% --passWithNoTests
# Run platform-specific tests of the editor bridge
- yarn test:editor-mobile-bridge:ios
- yarn test:editor-mobile-bridge:android
# This script acts like a unit test to check changes to @atlaskit/adf-schema.
- node build/ci-scripts/run.if.package.changed.js @atlaskit/adf-schema -- yarn build:adf-schema:checkuptodate
after-script:
- yarn send:stepFailureEvents
caches:
- node
# https://product-fabric.atlassian.net/browse/ED-6927
# - step:
# name: Browser Unit Testing
# script:
# - source ./build-setup.sh
# - bolt install --frozen-lockfile
# - echo "Run browser unit tests using Karma + Browserstack"
# - node build/ci-scripts/run.tool.if.changed.js karma -- yarn test:browser:browserstack
# after-script:
# - yarn send:stepFailureEvents
# caches:
# - node
- step:
name: Browser Integration Testing
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- echo "Run browser integration tests using Webdriver + Browserstack"
# If we have changed any packages with webdriver tests, we wait until browserstack has free resources, then run our tests.
# BS_SESSIONS_ALLOWED represents the percentage of sessions allowed.
- LOCAL_IDENTIFIER=$(date +%s) BS_RETRY=5 BS_SESSIONS_ALLOWED=80 node build/ci-scripts/run.tool.if.changed.js webdriver -- node build/ci-scripts/wait.for.browserstack.resources.js && yarn test:webdriver:browserstack:changed
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Visual Regression Tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.16
script:
- source ./build-setup.sh
- git lfs pull
- bolt install --frozen-lockfile
- yarn run test:vr:changed
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
caches:
- node
- step:
name: Building website
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
# This next line just makes it so we can skip website builds by having a branch name that starts with "skip-website/".
- if [[ "$BITBUCKET_BRANCH" == skip-website/* ]]; then echo "Skipping website build" && mkdir dist && echo "Build skipped" > dist/index.html; else WEBSITE_ENV=staging yarn build:no-minimize; fi
- yarn build:copy
- set -o pipefail # Make sure we fail if the deployment fails.
# We pipe the output to stdout AND deploy-log.txt so that we can read the live url
- yarn deploy:staging | tee deploy-log.txt
- cat deploy-log.txt | grep "URL:" | sed "s/Live Draft Url..//gi" > netlify-link.txt
- echo "Uploading netlify build link to s3 so that we can fetch at the end..."
- node ../build/ci-scripts/upload.build.artefact.for.commit.js netlify-link.txt
after-script:
- yarn send:stepFailureEvents
caches:
- node
- step:
name: Sending Website Build Url
script:
- (cd build/utils && yarn install) # Needed for npm-run when updating status.
- cd build/ci-scripts
- yarn install
- node download.build.artefact.for.commit.js netlify-link.txt
- node update.build.status.with.netlify.link.js
after-script:
- yarn send:buildEvents
# Pipelines that can be scheduled or triggered manually.
custom:
# This should only be called by a scheduled build to deploy production website from latest master.
build-website-production:
- step:
script:
- source ./build-setup.sh
- ([[ "$BITBUCKET_BRANCH" == "master" ]]) || (echo "This build should only be run on master" && exit 1)
- bolt install --frozen-lockfile
- cd website
- WEBSITE_ENV=production yarn build
- yarn build:copy
- yarn deploy:production
after-script:
- yarn send:buildEvents
caches:
- node
# This can be called to deploy staging website from any branches.
build-website-staging:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
- WEBSITE_ENV=staging yarn build:no-minimize
- yarn build:copy
- set -o pipefail
- yarn deploy:staging | tee deploy-log.txt
- cat deploy-log.txt | grep "URL:" | sed "s/Live Draft Url..//gi" > netlify-link.txt
- echo "Uploading netlify build link to s3 so that we can fetch at the end..."
- node ../build/ci-scripts/upload.build.artefact.for.commit.js netlify-link.txt
after-script:
- yarn send:buildEvents
caches:
- node
# This should only be called by a scheduled or manual build from master.
# It builds the website and send the data to redash.
send-website-build-analytics:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
- yarn build:report
# We could optionally upload these to s3 if we wanted, leaving this here as an example:
# - node ../build/ci-scripts/upload.build.artefact.for.commit.js dist/report.html
# - node ../build/ci-scripts/upload.build.artefact.for.commit.js dist/stats.json
- node ./scripts/uploadBundleAnalyticsEvent.js
after-script:
- yarn send:buildEvents
caches:
- node
# This will run the full suite of the webdriver tests on Browserstack.
build-webdriver:
- step:
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:webdriver:browserstack
after-script:
- yarn send:buildEvents
caches:
- node
# This will run the full suite of the visual regression tests using Docker.
build-visual-regression:
- step:
image: atlassianlabs/atlaskit-mk-2-vr:1.0.16
script:
- source ./build-setup.sh
- git lfs pull
- bolt install --frozen-lockfile
- yarn run test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:buildEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
caches:
- node
# This will run essentially the branch builds, but without any optimizations and should be manually.
# This build should be run in any potentially risky builds.
run-full-suite:
- parallel:
- step:
name: Building packages
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Lint + Typecheck
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn lint
- yarn typecheck
after-script:
- yarn send:stepFailureEvents
- step:
name: Running All Unit tests
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test --maxWorkers=50%
# Run platform-specific tests of the editor bridge
- yarn test:editor-mobile-bridge:ios
- yarn test:editor-mobile-bridge:android
after-script:
- yarn send:stepFailureEvents
# - step:
# name: Running All Browser Unit tests
# script:
# - source ./build-setup.sh
# - bolt install --frozen-lockfile
# - yarn test:browser:browserstack
# after-script:
# - yarn send:stepFailureEvents
- step:
name: Running All Browser Integration tests
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:webdriver:browserstack
after-script:
- yarn send:stepFailureEvents
- step:
name: Running All Visual Regression tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.16
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
- step:
name: Building the website
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- cd website
# don't worry about deploying, this build will always be run alongside a branch build
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Sending Build Events
script:
- echo 'Sending Build Events...'
after-script:
- yarn send:buildEvents
# This build is used as our `merge` build when managing concurrent PR to master.
landkid:
- parallel:
- step:
name: Building
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn build
after-script:
- yarn send:stepFailureEvents
- step:
name: Linting
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn lint
after-script:
- yarn send:stepFailureEvents
- step:
name: Typechecking (and checking changesets)
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- yarn typecheck
- echo "We are now about to run the `version` command which will read changesets and bump packages"
- echo "We do this so that we know if the repo will be in an inconsistent state when this branch hits master"
- echo "If the step below fails, it's because a changeset may be bumping a package that is depended upon by a package that didn't exist when the changeset was created"
- echo "Read the very last error message, it will tell you exactly what is wrong (ignore all the first warnings you'll see)"
- yarn changeset bump
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 1 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="0" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
# This script acts like a unit test to check changes to @atlaskit/adf-schema.
- node build/ci-scripts/run.if.package.changed.js @atlaskit/adf-schema -- yarn build:adf-schema:checkuptodate
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 2 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="1" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
- yarn test:editor-mobile-bridge:ios
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Unit tests - Jest 2 of 3 chunks
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- export TMPFILE=$(mktemp /tmp/jest.XXXXXX) && yarn --silent jest --listTests --json > $TMPFILE
- STEPS="3" STEP_IDX="2" PARALLELIZE_TESTS_FILE="$TMPFILE" yarn jest --maxWorkers=50%
- yarn test:editor-mobile-bridge:android
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Browser Integration tests
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- bolt install --frozen-lockfile
- LANDKID=true yarn test:webdriver:browserstack:changed
after-script:
- yarn send:stepFailureEvents
- step:
name: Running Visual Regression tests
image: atlassianlabs/atlaskit-mk-2-vr:1.0.16
script:
- source ./build-setup.sh
- export TARGET_BRANCH="$(node build/ci-scripts/get.target.branch.js)" && echo "$TARGET_BRANCH"
- git fetch origin $TARGET_BRANCH && git checkout $TARGET_BRANCH && git checkout - && git merge $TARGET_BRANCH --no-edit
- git lfs pull
- bolt install --frozen-lockfile
- yarn test:vr
after-script:
# Extract all the diff images and store them into a folder for download.
- mkdir ./imageSnapshotFailures && find . \( -name '*-diff.png' -or -name '*-error.png' \) -not -path "./node_modules/*" -exec cp {} ./imageSnapshotFailures \;
- yarn send:stepFailureEvents
# If a failure occurs, you can download the image snapshot of the differences.
artifacts:
- imageSnapshotFailures/**
- step:
name: Wait until no master is running
script:
- source ./build-setup.sh
- cd build/ci-scripts
- yarn --ignore-engines
- node ./wait.until.no.master.build.running.js
after-script:
- yarn send:buildEvents
# This build should only be run on the master branch, once per day.
# It manually clears the cache and runs a very quick install node_modules.
# We split into two steps so that one can clear the cache so that the second one starts with no cache.
# (Which causes it to upload when it's finished).
reseed-pipelines-cache:
- step:
name: Clearing old cache
script:
- ([[ "$BITBUCKET_BRANCH" == "master" ]]) || (echo "This build should only be run on master" && exit 1)
- cd build/ci-scripts
- bolt install --frozen-lockfile
- node clear.pipelines.node.cache.js
- step:
name: Creating new cache
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
# We re-clear the cache here in case any other builds have managed to start and finish in between us starting.
# (our build will only upload a cache if there is none when the build finishes).
- node build/ci-scripts/clear.pipelines.node.cache.js
caches:
- node
# This build allow to deploy branch dists to easily tests new version of components into consumers / products code base.
deploy-branch-build-dists:
- step:
name: Deploy branch build dists
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
- export CHANGED_PACKAGES=$(node build/ci-scripts/get.changed.packages.since.master.js)
# Change into a glob pattern (removing brackets, spaces and quotes).
- export CHANGED_PACKAGES_GLOB=$(echo "$CHANGED_PACKAGES" | sed 's/[][" ]//g')
- node build/ci-scripts/branch-deploys/update.changed.packages.deps.to.cdn.js
# We add in the extra braces and a trailing comma in case we only have one package
- bolt ws exec --only-fs="{$CHANGED_PACKAGES_GLOB,}" -- npm pack
- mkdir -p dists/
- node build/ci-scripts/branch-deploys/copy.built.tgzs.to.dists.dir.js
- for file in dists/*; do node build/ci-scripts/upload.build.artefact.for.commit.js $file dists/; done
artifacts:
- dists/manifest.json
caches:
- node
# This is a custom build step that merges master branch then upload ratchet files to S3 on a scheduled basis.
# It is broken to multiple steps to gain speed and avoid OOM issues.
push-bundle-size-to-s3:
- parallel:
- step:
name: Bundle size update for editor-part-1 packages
script:
- source ./build-setup.sh
- git merge master --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js editor-part-1| xargs -n1 -P2 yarn measure --updateSnapshot --s3
artifacts:
- .masterBundleSize/**
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for editor-part-2 packages
script:
- source ./build-setup.sh
- git merge master --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js editor-part-2| xargs -n1 -P2 yarn measure --updateSnapshot --s3
artifacts:
- .masterBundleSize/**
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for core packages
script:
- source ./build-setup.sh
- git merge master --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js core| xargs -n1 -P2 yarn measure --updateSnapshot --s3
artifacts:
- .masterBundleSize/**
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for media packages
script:
- source ./build-setup.sh
- git merge master --no-edit
- bolt install --frozen-lockfile
- node build/ci-scripts/get.pkgs.in.team.js media| xargs -n1 -P2 yarn measure --updateSnapshot --s3
artifacts:
- .masterBundleSize/**
after-script:
- yarn send:bundleSize
caches:
- node
- step:
name: Bundle size update for all other packages
script:
- source ./build-setup.sh
- git merge master --no-edit
- bolt install --frozen-lockfile
- export input=elements,bitbucket,css-packs,growth,help,helpers,home,jira,navigation,people-and-teams,search,teamwork-ecosystem,engagement-platform,server
- node build/ci-scripts/get.pkgs.in.team.js $input| xargs -n1 -P2 yarn measure --updateSnapshot --s3
artifacts:
- .masterBundleSize/**
after-script:
- yarn send:bundleSize
caches:
- node
# A pipeline to update a package's i18n translation messages.
# Per package, it will push i18n messages and pull translations. This is based on the package.json (i18n:push, i18n:pull)
# A pull request is created and assigned to defined reviewers.
# Each package can be configured within update.i18n.translations.js
update-i18n-translations:
- step:
name: Push and pull translations and create pull request
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- echo 'Pushing'; node build/ci-scripts/update.i18n.translations push
- echo 'Pulling'; node build/ci-scripts/update.i18n.translations pull
# Validates built dists and package contents against what is on npm
run-build-validator:
- step:
name: Run build validator
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
- yarn build
# - yarn build:editor-mobile-bridge
# Run validation in quiet mode as well to easily check file differences
# Validate packages will produce false positives and is for manual analysis so we always return true
- cd build/build-validator && (yarn validate-packages || yarn validate-packages --quiet) || true
# This replicates builds that would happen locally on a clean slate for a single package
run-build-validator-per-package:
- step:
name: Run build validator per package
script:
- source ./build-setup.sh
- bolt install --frozen-lockfile
# Exclude css-reset as it fails because of its postbuild ts not suppressing module not found errors
- bolt workspaces exec --no-bail --ignore "@atlaskit/{css-reset,email-renderer}" --only-fs "packages/*/*" --serial -- bash -c 'bolt p run build:clean $(grep name.*@atlaskit package.json | cut -d \" -f 4)'
# Validate packages will produce false positives and is for manual analysis so we always return true
- yarn validate-packages || true