Skip to content

Commit 7341499

Browse files
authored
CI: Improve build times with azcopy (#7031)
* replace Azure CLI with AzCopy * use wget * update command * remove azure-cli image * Revert "remove azure-cli image" This reverts commit 07b7ed0.
1 parent 437b381 commit 7341499

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.circleci/config.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,17 @@ jobs:
482482
steps:
483483
- attach_workspace:
484484
at: /tmp/dist
485-
485+
- run:
486+
name: Install AzCopy
487+
command: |
488+
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
489+
tar -xf azcopy.tar.gz
490+
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
486491
- run:
487492
name: deploy
488493
command: |
489494
if [ $AZURE_STORAGE_SAS_TOKEN ]; then
490-
az storage blob upload-batch -d reactspectrum -s /tmp/dist --account-name reactspectrum
495+
azcopy copy "/tmp/dist/*" "https://reactspectrum.blob.core.windows.net/reactspectrum${AZURE_STORAGE_SAS_TOKEN}" --recursive
491496
fi
492497
493498
# Separate deploy workflow for the test docs built w/ verdaccio packages so it doesn't hold up the other deploy workflows
@@ -497,11 +502,17 @@ jobs:
497502
steps:
498503
- attach_workspace:
499504
at: /tmp/verdaccio_dist
505+
- run:
506+
name: Install AzCopy
507+
command: |
508+
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
509+
tar -xf azcopy.tar.gz
510+
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
500511
- run:
501512
name: deploy
502513
command: |
503514
if [ $AZURE_STORAGE_SAS_TOKEN ]; then
504-
az storage blob upload-batch -d reactspectrum/$CIRCLE_SHA1/verdaccio -s /tmp/verdaccio_dist/*/verdaccio --account-name reactspectrum
515+
azcopy copy "/tmp/verdaccio_dist/*/verdaccio/*" "https://reactspectrum.blob.core.windows.net/reactspectrum/$CIRCLE_SHA1/verdaccio${AZURE_STORAGE_SAS_TOKEN}" --recursive
505516
fi
506517
507518
deploy-production:
@@ -510,9 +521,15 @@ jobs:
510521
steps:
511522
- attach_workspace:
512523
at: /tmp/dist
524+
- run:
525+
name: Install AzCopy
526+
command: |
527+
wget -O azcopy.tar.gz https://aka.ms/downloadazcopy-v10-linux
528+
tar -xf azcopy.tar.gz
529+
mv ./azcopy_linux_amd64_*/azcopy /usr/local/bin/
513530
- run:
514531
name: deploy
515-
command: az storage blob upload-batch -d "\$web" -s /tmp/dist/production/docs --account-name reactspectrum --overwrite true
532+
command: azcopy copy "/tmp/dist/production/docs/*" "https://reactspectrum.blob.core.windows.net/\$web${AZURE_STORAGE_SAS_TOKEN}" --recursive
516533

517534
comment:
518535
executor: rsp

0 commit comments

Comments
 (0)