Created
January 28, 2019 14:03
-
-
Save olblak/53ea3269161bf5edfa44497eadce043f to your computer and use it in GitHub Desktop.
file upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /srv/releases/.azure-storage-env | |
## Sync files from "/srv/releases/jenkins/$CONTAINER" to $CONTAINER for each container in "$AZURE_STORAGE_ACCOUNT", | |
for CONTAINER in $(az storage container list --account-name "$AZURE_STORAGE_ACCOUNT" --account-key "$AZURE_STORAGE_KEY" --query '[*].name' --output table ); do | |
if [ -d "/srv/releases/jenkins/$CONTAINER" ]; then | |
echo "Syncing Container: $CONTAINER"; | |
time blobxfer upload \ | |
--local-path "/srv/releases/jenkins/$CONTAINER/" \ | |
--storage-account-key "$AZURE_STORAGE_KEY" \ | |
--storage-account "$AZURE_STORAGE_ACCOUNT" \ | |
--remote-path $CONTAINER \ | |
--recursive \ | |
--skip-on-lmt-ge \ | |
--connect-timeout 30 \ | |
--exclude '.htaccess' | |
fi | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment