Use the same environment variables that the `az` command line uses

This commit is contained in:
R. Tyler Croy 2016-11-07 07:28:09 -08:00
parent 25bd74d25f
commit 9cf990aeaa
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 6 additions and 1 deletions

View File

@ -3,9 +3,14 @@
require 'set'
require 'azure/storage'
# NOTE: Be sure to set the environment variables:
# export AZURE_STORAGE_ACCOUNT = <your azure storage account name>
# export AZURE_STORAGE_KEY = <your azure storage access key>
BASE_DIR = '/srv/releases/jenkins/'
client = Azure::Storage::Client.create
client = Azure::Storage::Client.create(:storage_account_name => ENV['AZURE_STORAGE_ACCOUNT'],
:storage_access_key => ENV['AZURE_STORAGE_KEY'])
blobs = client.blob_client
blobs.list_containers.each do |container|