Add scheduling profiler deployment CI job (#19874)
* Add vercel to scheduling profiler dev deps * Add vercel.json * Add CD job * Add CD setup instructions
E-Liang Tan committed
Sep 22, 2020 at 20:34 UTC
04e21efd09ab35ed33ca5374ef13ccb9fe69455a
5 files changed
+152
-3
.circleci/config.yml
+25
@@ -312,6 +312,24 @@ jobs:
312
tar -zcvf ../../../build/devtools-scheduling-profiler.tgz .
313
- store_artifacts:
314
path: ./build/devtools-scheduling-profiler.tgz
315
+ - persist_to_workspace:
316
+ root: packages/react-devtools-scheduling-profiler
317
+ paths:
318
+ - dist
319
+
320
+ deploy_devtools_scheduling_profiler:
321
+ docker: *docker
322
+ environment: *environment
323
+ steps:
324
+ - checkout
325
+ - attach_workspace:
326
+ at: packages/react-devtools-scheduling-profiler
327
+ - *restore_node_modules
328
+ - run:
329
+ name: Deploy
330
+ command: |
331
+ cd packages/react-devtools-scheduling-profiler
332
+ yarn vercel deploy dist --prod --confirm --token $SCHEDULING_PROFILER_DEPLOY_VERCEL_TOKEN
333
334
# These jobs are named differently so we can distinguish the stable and
335
# and experimental artifacts
@@ -551,6 +569,13 @@ workflows:
569
- build_devtools_scheduling_profiler:
570
requires:
571
- yarn_build
572
+ - deploy_devtools_scheduling_profiler:
573
+ requires:
574
+ - build_devtools_scheduling_profiler
575
+ filters:
576
+ branches:
577
+ only:
578
+ - master
579
580
fuzz_tests:
581
triggers:
packages/react-devtools-scheduling-profiler/README.md
+13
-1
@@ -1,3 +1,15 @@
1
# Experimental React Concurrent Mode Profiler
2
3
-- Deployed at: https://react-scheduling-profiler.vercel.app
3
+https://react-devtools-scheduling-profiler.vercel.app/
4
+
5
+## Setting up continuous deployment with CircleCI and Vercel
6
+
7
+These instructions are intended for internal use, but may be useful if you are setting up a custom production deployment of the scheduling profiler.
8
+
9
+1. Create a Vercel token at https://vercel.com/account/tokens.
10
+2. Configure CircleCI:
11
+ 1. In CircleCI, navigate to the repository's Project Settings.
12
+ 2. In the Advanced tab, ensure that "Pass secrets to builds from forked pull requests" is set to false.
13
+ 3. In the Environment Variables tab, add the Vercel token as a new `SCHEDULING_PROFILER_DEPLOY_VERCEL_TOKEN` environment variable.
14
+
15
+The Vercel project will be created when the deploy job runs.
packages/react-devtools-scheduling-profiler/package.json
+1
@@ -26,6 +26,7 @@
26
"html-webpack-plugin": "^4.3.0",
27
"style-loader": "^1.2.1",
28
"url-loader": "^4.1.0",
29
+ "vercel": "^20.1.0",
30
"webpack": "^4.44.1",
31
"webpack-cli": "^3.3.12",
32
"webpack-dev-server": "^3.11.0",
packages/react-devtools-scheduling-profiler/vercel.json
new
+3
@@ -0,0 +1,3 @@
1
+{
2
+ "name": "react-devtools-scheduling-profiler"
3
+}
yarn.lock
+110
-2
@@ -2360,6 +2360,35 @@
2360
"@typescript-eslint/types" "4.1.0"
2361
eslint-visitor-keys "^2.0.0"
2362
2363
+"@vercel/build-utils@2.5.1":
2364
+ version "2.5.1"
2365
+ resolved "https://registry.yarnpkg.com/@vercel/build-utils/-/build-utils-2.5.1.tgz#2f687c2d82464dd85e0ed8130bc01e5dac9b11a4"
2366
+ integrity sha512-689ov8fGrgVnLwPbJUvgUKdSTseZiOMobR4XoZjmSmeF8+gaOpycsdGuVFzNtdFneUiQWO/k5AkY5diZj8fNgg==
2367
+
2368
+"@vercel/go@1.1.6":
2369
+ version "1.1.6"
2370
+ resolved "https://registry.yarnpkg.com/@vercel/go/-/go-1.1.6.tgz#45ac3a6bd98a15b8bf1028b8c141a51fd971ac15"
2371
+ integrity sha512-swA2crS08fkPmw4UkR9yjmoL8FOCzuNHLFDqj8oM1V9ni610ibJ7Xk57jI8uyS7bTecQVh8VUxihb+SF0GT+aw==
2372
+
2373
+"@vercel/node@1.8.1":
2374
+ version "1.8.1"
2375
+ resolved "https://registry.yarnpkg.com/@vercel/node/-/node-1.8.1.tgz#aa0a04f425638874d19be64f7905018ef6f9b1c5"
2376
+ integrity sha512-vQsYMrulghMaHEKbqxJCQPfHrGEBmYmQMLYrx+m8kolKDq1LQDWFx2MRh4DyMnGfYSoYoW5PI2HP7NAfbEjzmg==
2377
+ dependencies:
2378
+ "@types/node" "*"
2379
+ ts-node "8.9.1"
2380
+ typescript "3.9.3"
2381
+
2382
+"@vercel/python@1.2.3":
2383
+ version "1.2.3"
2384
+ resolved "https://registry.yarnpkg.com/@vercel/python/-/python-1.2.3.tgz#23ebb71c753fe1cc75fe186c89fc0af04c950191"
2385
+ integrity sha512-DJRvL6bmt4m0xrkzSKUbP8mK57YSDdTBWoo0JYyXq/o2golQrv/wQTalbNchd4P8NhVL3mZuk/1JNYuv5u1rKQ==
2386
+
2387
+"@vercel/ruby@1.2.4":
2388
+ version "1.2.4"
2389
+ resolved "https://registry.yarnpkg.com/@vercel/ruby/-/ruby-1.2.4.tgz#60e0a91d7a1a730a7ecdbc6e095acb95f28f24be"
2390
+ integrity sha512-g19vrrmJ4MTJCRB/bvx8DahIsml1iPn7wsdHf5k3QVN6lT0dlDILSBwpERC4hqzndimaApsmWOfjYtY9/L6+tQ==
2391
+
2392
"@webassemblyjs/ast@1.9.0":
2393
version "1.9.0"
2394
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964"
@@ -2952,6 +2981,11 @@ archiver@~2.1.0:
2981
tar-stream "^1.5.0"
2982
zip-stream "^1.2.0"
2983
2984
+arg@^4.1.0:
2985
+ version "4.1.3"
2986
+ resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
2987
+ integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
2988
+
2989
argparse@^1.0.7:
2990
version "1.0.10"
2991
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -4402,7 +4436,7 @@ configstore@^3.0.0:
4436
write-file-atomic "^2.0.0"
4437
xdg-basedir "^3.0.0"
4438
4405
-configstore@^5.0.0:
4439
+configstore@^5.0.0, configstore@^5.0.1:
4440
version "5.0.1"
4441
resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96"
4442
integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==
@@ -5108,6 +5142,11 @@ diff@4.0.1:
5142
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.1.tgz#0c667cb467ebbb5cea7f14f135cc2dba7780a8ff"
5143
integrity sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==
5144
5145
+diff@^4.0.1:
5146
+ version "4.0.2"
5147
+ resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
5148
+ integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
5149
+
5150
diffie-hellman@^5.0.0:
5151
version "5.0.3"
5152
resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875"
@@ -5559,6 +5598,11 @@ escalade@^3.0.2:
5598
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.0.2.tgz#6a580d70edb87880f22b4c91d0d56078df6962c4"
5599
integrity sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==
5600
5601
+escape-goat@^2.0.0:
5602
+ version "2.1.1"
5603
+ resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-2.1.1.tgz#1b2dc77003676c457ec760b2dc68edb648188675"
5604
+ integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==
5605
+
5606
escape-html@~1.0.3:
5607
version "1.0.3"
5608
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -9293,6 +9337,11 @@ make-dir@^3.0.0:
9337
dependencies:
9338
semver "^6.0.0"
9339
9340
+make-error@^1.1.1:
9341
+ version "1.3.6"
9342
+ resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
9343
+ integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
9344
+
9345
make-fetch-happen@^7.1.0:
9346
version "7.1.0"
9347
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-7.1.0.tgz#22038954801048ac598c72e0f0c239e42d97fa2e"
@@ -11163,6 +11212,13 @@ punycode@^2.1.0, punycode@^2.1.1:
11212
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
11213
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
11214
11215
+pupa@^2.0.1:
11216
+ version "2.0.1"
11217
+ resolved "https://registry.yarnpkg.com/pupa/-/pupa-2.0.1.tgz#dbdc9ff48ffbea4a26a069b6f9f7abb051008726"
11218
+ integrity sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA==
11219
+ dependencies:
11220
+ escape-goat "^2.0.0"
11221
+
11222
qs@6.7.0:
11223
version "6.7.0"
11224
resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
@@ -12499,7 +12555,7 @@ source-map-support@0.5.16:
12555
buffer-from "^1.0.0"
12556
source-map "^0.6.0"
12557
12502
-source-map-support@0.5.19, source-map-support@~0.5.12:
12558
+source-map-support@0.5.19, source-map-support@^0.5.17, source-map-support@~0.5.12:
12559
version "0.5.19"
12560
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61"
12561
integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==
@@ -13343,6 +13399,17 @@ truncate-utf8-bytes@^1.0.0:
13399
dependencies:
13400
utf8-byte-length "^1.0.1"
13401
13402
+ts-node@8.9.1:
13403
+ version "8.9.1"
13404
+ resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.9.1.tgz#2f857f46c47e91dcd28a14e052482eb14cfd65a5"
13405
+ integrity sha512-yrq6ODsxEFTLz0R3BX2myf0WBCSQh9A+py8PBo1dCzWIOcvisbyH6akNKqDHMgXePF2kir5mm5JXJTH3OUJYOQ==
13406
+ dependencies:
13407
+ arg "^4.1.0"
13408
+ diff "^4.0.1"
13409
+ make-error "^1.1.1"
13410
+ source-map-support "^0.5.17"
13411
+ yn "3.1.1"
13412
+
13413
tslib@^1.10.0:
13414
version "1.13.0"
13415
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
@@ -13446,6 +13513,11 @@ typedarray@^0.0.6:
13513
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
13514
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
13515
13516
+typescript@3.9.3:
13517
+ version "3.9.3"
13518
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a"
13519
+ integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==
13520
+
13521
typescript@^3.7.5:
13522
version "3.7.5"
13523
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
@@ -13596,6 +13668,25 @@ update-notifier@4.0.0:
13668
semver-diff "^3.1.1"
13669
xdg-basedir "^4.0.0"
13670
13671
+update-notifier@4.1.0:
13672
+ version "4.1.0"
13673
+ resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-4.1.0.tgz#4866b98c3bc5b5473c020b1250583628f9a328f3"
13674
+ integrity sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==
13675
+ dependencies:
13676
+ boxen "^4.2.0"
13677
+ chalk "^3.0.0"
13678
+ configstore "^5.0.1"
13679
+ has-yarn "^2.1.0"
13680
+ import-lazy "^2.1.0"
13681
+ is-ci "^2.0.0"
13682
+ is-installed-globally "^0.3.1"
13683
+ is-npm "^4.0.0"
13684
+ is-yarn-global "^0.3.0"
13685
+ latest-version "^5.0.0"
13686
+ pupa "^2.0.1"
13687
+ semver-diff "^3.1.1"
13688
+ xdg-basedir "^4.0.0"
13689
+
13690
update-notifier@^2.1.0:
13691
version "2.5.0"
13692
resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6"
@@ -13776,6 +13867,18 @@ vary@~1.1.2:
13867
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
13868
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
13869
13870
+vercel@^20.1.0:
13871
+ version "20.1.0"
13872
+ resolved "https://registry.yarnpkg.com/vercel/-/vercel-20.1.0.tgz#366c39892455f5fff9b1d31db6e6ac1dff436453"
13873
+ integrity sha512-fOYq2X6o157hOBbyxU9VcM2pCHa6cAxvkA731N9FEw8MyMnPC7zJRgFQ/kYJ0oisjlKsmm2A1ryrLEz3KLIDFw==
13874
+ dependencies:
13875
+ "@vercel/build-utils" "2.5.1"
13876
+ "@vercel/go" "1.1.6"
13877
+ "@vercel/node" "1.8.1"
13878
+ "@vercel/python" "1.2.3"
13879
+ "@vercel/ruby" "1.2.4"
13880
+ update-notifier "4.1.0"
13881
+
13882
verror@1.10.0:
13883
version "1.10.0"
13884
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
@@ -14551,6 +14654,11 @@ yauzl@2.4.1:
14654
dependencies:
14655
fd-slicer "~1.0.1"
14656
14657
+yn@3.1.1:
14658
+ version "3.1.1"
14659
+ resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
14660
+ integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
14661
+
14662
zip-dir@1.0.2:
14663
version "1.0.2"
14664
resolved "https://registry.yarnpkg.com/zip-dir/-/zip-dir-1.0.2.tgz#253f907aead62a21acd8721d8b88032b2411c051"