Amazon S3 deployment provider copies all or selected artifacts to Amazon S3 storage.
access_key_id) - AWS account access key.secret_access_key) - AWS secret access key.bucket) - The name of bucket to which artifacts are copied.region) - AWS region where the bucket is located.folder) - Name of folder to copy to.artifact) - Name of artifact(s) to copy. If more than one, separate with commas (,).unzip) - Optional. Default is false.remove_files) - Optional. Default is false.set_public) - Optional. Default is false.encrypt) - 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.reduced_redundancy) - Optional. Default is false.max_error_retry) - Optional. Number of times provider will retry after a failure. Default is 0.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 release directory:
deploy:
provider: S3
access_key_id: <access-key>
secret_access_key: <secret-key>
bucket: company-downloads
region: eu-west-1
folder: release
Example 2 - deploy static site by expanding zip artifact with deployment name MyApp to the root of S3 bucket:
deploy:
provider: S3
artifact: MyApp
access_key_id: <access-key>
secret_access_key: <secret-key>
bucket: my-static-site-example
region: eu-west-1
unzip: true
set_public: true
remove_files: true
set_content_type: true
gzip_files: '**/*.js, **/*.html'
headers: |
**/*.js
Cache-Control: max-age=3600
**/*.zip
Content-Disposition: attachment