mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Save CI-built node_modules as build artifacts (#14205)
* Store node_modules generated by CI script as an artifact * NPM pack artifacts before archiving
This commit is contained in:
@@ -40,3 +40,6 @@ jobs:
|
||||
key: v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- node_modules
|
||||
|
||||
- store_artifacts:
|
||||
path: ./node_modules.tgz
|
||||
11
scripts/circleci/pack_and_store_artifact.sh
Executable file
11
scripts/circleci/pack_and_store_artifact.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# NPM pack all modules to ensure we archive the correct set of files
|
||||
for dir in ./build/node_modules/* ; do
|
||||
npm pack "$dir"
|
||||
done
|
||||
|
||||
# Wrap everything in a single zip file for easy download by the publish script
|
||||
tar -zcvf ./node_modules.tgz ./*.tgz
|
||||
@@ -30,6 +30,7 @@ if [ $((2 % CIRCLE_NODE_TOTAL)) -eq "$CIRCLE_NODE_INDEX" ]; then
|
||||
COMMANDS_TO_RUN+=('yarn test-build-prod --maxWorkers=2')
|
||||
COMMANDS_TO_RUN+=('node ./scripts/tasks/danger')
|
||||
COMMANDS_TO_RUN+=('./scripts/circleci/upload_build.sh')
|
||||
COMMANDS_TO_RUN+=('./scripts/circleci/pack_and_store_artifact.sh')
|
||||
fi
|
||||
|
||||
if [ $((3 % CIRCLE_NODE_TOTAL)) -eq "$CIRCLE_NODE_INDEX" ]; then
|
||||
|
||||
Reference in New Issue
Block a user