@samitouri / QOS-React-2 / commits / 2c1e5d2b22

Build and store DevTools artifacts in Circle CI (#17746)

Brian Vaughn committed Jan 1, 2020 at 07:58 UTC 2c1e5d2b223a267179954cfe54592a7ba102de10
2 files changed +46 -2
.circleci/config.yml
+21 -2
@@ -193,6 +193,22 @@ jobs:
193 - dist
194 - sizes/*.json
195
196 + build_devtools_and_process_artifacts:
197 + docker: *docker
198 + environment: *environment
199 + parallelism: 20
200 + steps:
201 + - checkout
202 + - attach_workspace: *attach_workspace
203 + - *restore_yarn_cache
204 + - *run_yarn
205 + - run:
206 + environment:
207 + RELEASE_CHANNEL: experimental
208 + command: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
209 + - store_artifacts:
210 + path: ./build/devtools.tgz
211 +
212 # These jobs are named differently so we can distinguish the stable and
213 # and experimental artifacts
214 process_artifacts: *process_artifacts
@@ -267,7 +283,7 @@ jobs:
283 RELEASE_CHANNEL: experimental
284 command: yarn test-build --maxWorkers=2
285
270 - test_build_devtools:
286 + test_devtools:
287 docker: *docker
288 environment: *environment
289 steps:
@@ -402,7 +418,10 @@ workflows:
418 - lint_build:
419 requires:
420 - build_experimental
405 - - test_build_devtools:
421 + - test_devtools:
422 + requires:
423 + - build_experimental
424 + - build_devtools_and_process_artifacts:
425 requires:
426 - build_experimental
427
scripts/circleci/pack_and_store_devtools_artifacts.sh new
+25
@@ -0,0 +1,25 @@
1 +#!/bin/bash
2 +
3 +set -e
4 +
5 +mkdir -p build/devtools
6 +
7 +cd packages/react-devtools
8 +npm pack
9 +mv ./react-devtools*.tgz ../../build/devtools/
10 +
11 +cd ../react-devtools-core
12 +npm pack
13 +mv ./react-devtools-core*.tgz ../../build/devtools/
14 +
15 +cd ../react-devtools-inline
16 +npm pack
17 +mv ./react-devtools-inline*.tgz ../../build/devtools/
18 +
19 +cd ../react-devtools-extensions
20 +yarn build
21 +mv ./chrome/build/ReactDevTools.zip ../../build/devtools/chrome-extension.zip
22 +mv ./firefox/build/ReactDevTools.zip ../../build/devtools/firefox-extension.zip
23 +
24 +# Compress all DevTools artifacts into a single tarball for easy download
25 +tar -zcvf ../../build/devtools.tgz ../../build/devtools
\ No newline at end of file