Azure blob storage provider copies all or selected artifacts to Windows Azure storage.
storage_account_name
) - Azure storage account name.storage_access_key
) - storage account access key.container
) - the name of storage container to copy to. Container name length must be between 3 and 63 symbols.folder
) - name of folder to copy to.artifact
) - name of artifact to copy.unzip
) - set true
to unpack Zip
artifacts before uploading to storage. Default is false
.remove_files
) - Optional. Default is false
.set_content_type
) - set true
to automatically configure content types based on file extensions, which default to application/octet-stream
otherwise. Default is false
.gzip_files
) - compress blobs satisfying file mask(s) on upload using gzip algorithm and set Content-Encoding: gzip
header. File mask examples:**/*.js
- gzip .js
files in all directories recursively;js/*.js
- gzip .js
files in js
directory only;**/*.js, **/*.html
- gzip .js
and .html
files in all directories recursively.headers
) - Optional. Allows to attach custom headers to blobs satisfying file mask(s). See custom headers specification below.Custom headers field has the following format:
glob_1
Header-Name: header value
...
glob_2
Header-Name: header value
...
For example:
**/*.js
Cache-Control: max-age=3600
**/*.zip
Content-Disposition: attachment
and the same in appveyor.yml
:
deploy:
provider: S3
...
headers: |
**/*.js
Cache-Control: max-age=3600
**/*.zip
Content-Disposition: attachment
Example 1 - uploading all build artifacts “as is” to remote {project-slug}\{build-version}
directory:
deploy:
provider: AzureBlob
storage_account_name: mystorage
storage_access_key:
secure: ZZbm8KKD1lLCi9btF1fDkQ==
container: builds
folder: $(APPVEYOR_PROJECT_SLUG)\$(APPVEYOR_BUILD_VERSION)
Example 2 - deploy static site by expanding zip artifact with deployment name MyApp
to the root of $web
container:
deploy:
provider: AzureBlob
storage_account_name: mystorage
storage_access_key:
secure: ZZbm8KKD1lLCi9btF1fDkQ==
container: $web
unzip: true
remove_files: true
set_content_type: true
gzip_files: '**/*.js, **/*.html'
headers: |
**/*.js
Cache-Control: max-age=3600
**/*.zip
Content-Disposition: attachment