Skip to content

Instantly share code, notes, and snippets.

@AndrewAllison
Created June 9, 2021 10:39
Show Gist options
  • Save AndrewAllison/5d6f2f8e2c39892173975a29de0f5f35 to your computer and use it in GitHub Desktop.
Save AndrewAllison/5d6f2f8e2c39892173975a29de0f5f35 to your computer and use it in GitHub Desktop.
React to Azure Blob Storage Deploy Via Pipelines
steps:
- task: ExtractFiles@1
displayName: 'Extract files '
inputs:
archiveFilePatterns: '**/$(Build.BuildId).zip'
destinationFolder: '$(agent.builddirectory)'
overwriteExistingFiles: true
variables:
AZURE_STORAGE_ACCOUNT: '<INSERT HERE>'
AZURE_STORAGE_KEY: '<INSERT HERE>'
steps:
- task: AzureCLI@2
displayName: 'Upload to blob'
inputs:
azureSubscription: '<INSERT HERE>'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: 'az storage blob upload-batch --account-name $(AZURE_STORAGE_ACCOUNT) --auth-mode key --account-key $(AZURE_STORAGE_KEY) -d `$web -s ./'
useGlobalConfig: true
workingDirectory: '$(agent.builddirectory)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment