Skip to content

Commit

Permalink
Merge pull request #276 from aws-quickstart/release/v0.8
Browse files Browse the repository at this point in the history
Release taskcat [0.8.31]
  • Loading branch information
tonynv authored Apr 24, 2019
2 parents ac7481c + 7f43383 commit bffc384
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.30
current_version = 0.8.31
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_suite():
url='https://aws-quickstart.github.io/taskcat/',
license='Apache License 2.0',
download_url='https://github.com/aws-quickstart/taskcat/tarball/master',
version = '0.8.30',
version = '0.8.31',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down
29 changes: 29 additions & 0 deletions taskcat/stacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def __init__(self, nametag='[taskcat]'):
self.lambda_build_only = False
self.one_or_more_tests_failed = False
self.exclude = []
self.enable_sig_v2 = False

# SETTERS ANPrintMsg.DEBUG GETTERS
# ===================
Expand Down Expand Up @@ -460,6 +461,27 @@ def stage_in_s3(self, taskcat_cfg):
Bucket=auto_bucket,
Tagging={"TagSet": self.tags}
)
if not self.enable_sig_v2:
print(PrintMsg.INFO + "Enforcing sigv4 requests for bucket %s" % auto_bucket)
policy = """{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Test",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::%s/*",
"Condition": {
"StringEquals": {
"s3:signatureversion": "AWS"
}
}
}
]
}
""" % auto_bucket
s3_client.put_bucket_policy(Bucket=auto_bucket, Policy=policy)

for exclude in self.get_exclude():
if(os.path.isdir(exclude)):
Expand Down Expand Up @@ -1567,6 +1589,10 @@ def interface(self):
help="Exclude directories or files from s3 sync\n"
"Example: --exclude foo --exclude bar --exclude *.txt"
)
parser.add_argument(
'--enable-sig-v2',
action='store_true',
help="Allow sigv2 requests to auto generated buckets")

args = parser.parse_args()

Expand All @@ -1579,6 +1605,9 @@ def interface(self):
print(get_installed_version())
exit0()

if args.enable_sig_v2:
self.enable_sig_v2 = True

if args.upload_only:
self.upload_only = True

Expand Down

0 comments on commit bffc384

Please sign in to comment.