summaryrefslogtreecommitdiff
path: root/.ci/s3-upload.py
diff options
context:
space:
mode:
authorElvis Pranskevichus <elvis@magic.io>2020-04-22 22:33:12 -0700
committerElvis Pranskevichus <elvis@magic.io>2020-04-22 22:33:12 -0700
commita79c02ecdf2ec7b8bfb84c8af42691029a35829d (patch)
tree031480cd1d44ee55db00e2dd485f402051bdc0bb /.ci/s3-upload.py
parente7f341db0336870c09827b3159ed3a92ef7f64ac (diff)
downloadimmutables-a79c02ecdf2ec7b8bfb84c8af42691029a35829d.tar.gz
immutables-a79c02ecdf2ec7b8bfb84c8af42691029a35829d.zip
Drop Travis and Appveyor CI
Switch to Github Actions exclusively
Diffstat (limited to '.ci/s3-upload.py')
-rwxr-xr-x.ci/s3-upload.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/.ci/s3-upload.py b/.ci/s3-upload.py
deleted file mode 100755
index 92479af..0000000
--- a/.ci/s3-upload.py
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/usr/bin/env python3
-
-
-import argparse
-import glob
-import os
-import os.path
-import sys
-
-import tinys3
-
-
-def main():
- parser = argparse.ArgumentParser(description='S3 File Uploader')
- parser.add_argument(
- '--s3-bucket',
- help=('S3 bucket name (defaults to $S3_UPLOAD_BUCKET)'),
- default=os.environ.get('S3_UPLOAD_BUCKET'))
- parser.add_argument(
- '--s3-region',
- help=('S3 region (defaults to $S3_UPLOAD_REGION)'),
- default=os.environ.get('S3_UPLOAD_REGION'))
- parser.add_argument(
- '--s3-username',
- help=('S3 username (defaults to $S3_UPLOAD_USERNAME)'),
- default=os.environ.get('S3_UPLOAD_USERNAME'))
- parser.add_argument(
- '--s3-key',
- help=('S3 access key (defaults to $S3_UPLOAD_ACCESSKEY)'),
- default=os.environ.get('S3_UPLOAD_ACCESSKEY'))
- parser.add_argument(
- '--s3-secret',
- help=('S3 secret (defaults to $S3_UPLOAD_SECRET)'),
- default=os.environ.get('S3_UPLOAD_SECRET'))
- parser.add_argument(
- 'files', nargs='+', metavar='FILE', help='Files to upload')
-
- args = parser.parse_args()
-
- if args.s3_region:
- endpoint = 's3-{}.amazonaws.com'.format(args.s3_region.lower())
- else:
- endpoint = 's3.amazonaws.com'
-
- conn = tinys3.Connection(
- access_key=args.s3_key,
- secret_key=args.s3_secret,
- default_bucket=args.s3_bucket,
- tls=True,
- endpoint=endpoint,
- )
-
- for pattern in args.files:
- for fn in glob.iglob(pattern):
- with open(fn, 'rb') as f:
- conn.upload(os.path.basename(fn), f)
-
- return 0
-
-
-if __name__ == '__main__':
- sys.exit(main())