From 016a72a09ccf2e41183fc172fec9fb18642b14da Mon Sep 17 00:00:00 2001 From: Andrew Glenn Date: Wed, 3 Jul 2019 11:46:41 -0500 Subject: [PATCH 01/10] Adding set_ami support&tests for non-standard filters/mappings. Fixes #297 --- taskcat/amiupdater.py | 14 ++++---- tests/unittest/test_amiupdater.py | 56 +++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/taskcat/amiupdater.py b/taskcat/amiupdater.py index 131319ea4..4b7d7ea71 100644 --- a/taskcat/amiupdater.py +++ b/taskcat/amiupdater.py @@ -330,7 +330,7 @@ def _determine_regions(self): self._regions.add(region) def set_region_ami(self, cn, region, ami_id): - currvalue = self._contents['Mappings']['AWSAMIRegionMap'].get(region, None).get(cn, None) + currvalue = self._mapping_root.get(region, {}).get(cn, None) if currvalue: if currvalue != ami_id: self.set_updates(True) @@ -411,7 +411,7 @@ def list_unknown_mappings(self): for unknown_map in unknown_mappings: print(unknown_map) - def update_amis(self): + def update_amis(self, write=True): for template_file in self._fetch_template_files(): # Loads each template as an object. TemplateObject(template_file) @@ -425,16 +425,16 @@ def update_amis(self): Codenames.parse_api_results() print("{} API results parsed".format(PrintMsg.INFO)) - updates = False for template_object in TemplateObject.objects(): for result in APIResultsData.results: template_object.set_region_ami(result.codename, result.region, result.ami_id) # For each template, write it to disk. - for template_object in TemplateObject.objects(): - template_object.write() - print("{} Templates updated as necessary".format(PrintMsg.INFO)) - print("{} Complete!".format(PrintMsg.INFO)) + if write: + for template_object in TemplateObject.objects(): + template_object.write() + print("{} Templates updated as necessary".format(PrintMsg.INFO)) + print("{} Complete!".format(PrintMsg.INFO)) if TemplateObject.updates: raise AMIUpdaterCommitNeededException diff --git a/tests/unittest/test_amiupdater.py b/tests/unittest/test_amiupdater.py index ab12470c5..f00c3ba25 100644 --- a/tests/unittest/test_amiupdater.py +++ b/tests/unittest/test_amiupdater.py @@ -871,6 +871,37 @@ def _module_loader(self, return_module=False, commit_needed=False): } } } + nonstandard_mapping_and_filter_skeleton_template = { + "Filters": { + "NON_STANDARD_TEST":{ + "name": "amzn-ami-hvm-????.??.?.*-x86_64-gp2", + "owner-alias": "amazon" + } + }, + "Images":{ + "us-east-1":{ + "AMZNLINUXHVM": "FOOBAR", + "AMZNLINUXHVM_CUSTOM_CONFIG":"FOOBAR", + "NON_STANDARD_TEST":"FOOBAR" + }, + "us-east-2":{ + "AMZNLINUXHVM": "FOOBAR", + "AMZNLINUXHVM_CUSTOM_CONFIG":"FOOBAR", + "NON_STANDARD_TEST":"FOOBAR" + }, + "us-west-1":{ + "AMZNLINUXHVM": "FOOBAR", + "AMZNLINUXHVM_CUSTOM_CONFIG": "FOOBAR", + "NON_STANDARD_TEST": "FOOBAR" + }, + "us-west-2":{ + "AMZNLINUXHVM": "FOOBAR", + "AMZNLINUXHVM_CUSTOM_CONFIG": "FOOBAR", + "NON_STANDARD_TEST": "FOOBAR" + } + } + } + no_mapping_skeleton_template = { "Mappings":{ @@ -933,6 +964,8 @@ def create_ephemeral_template(self, template_type="generic"): data = self.generic_skeleton_template elif template_type == "inline": data = self.inline_skeleton_template + elif template_type == "nonstandard_inline": + data = self.nonstandard_mapping_and_filter_skeleton_template elif template_type == "no_mapping": data = self.no_mapping_skeleton_template elif template_type == "invalid_region": @@ -1010,6 +1043,29 @@ def test_local_config_ALAMI(self): with self.subTest(i="Verifying Updated AMI: [{}] / [{}]".format(mapping_name, region)): self.assertRegex(ami_id, self.ami_regex_pattern) + def test_unconventional_roots(self): + au, AMIUpdaterFatalException, AMIUpdaterCommitNeededException, tcau = self._module_loader(commit_needed=True, return_module=True) + cf = self.client_factory_handler() + mapping_name = "NON_STANDARD_TEST" + template_file = self.create_ephemeral_template(template_type="nonstandard_inline") + amiupdater_args = { + "path_to_templates": template_file, + "use_upstream_mappings": False, + "client_factory": cf + } + with self.assertRaises(AMIUpdaterCommitNeededException): + tcau.TemplateClass.mapping_path = "Images" + tcau.TemplateClass.metadata_path = "Filters" + a = au(**amiupdater_args) + a.update_amis() + + template_result = self.load_modified_template(template_file) + for region, mapping_data in template_result["Images"].items(): + for codename, ami_id in mapping_data.items(): + if codename == mapping_name: + with self.subTest(i="Verifying Updated AMI: [{}] / [{}]".format(mapping_name, region)): + self.assertRegex(ami_id, self.ami_regex_pattern) + def test_in_template_ALAMI(self): au, AMIUpdaterFatalException, AMIUpdaterCommitNeededException = self._module_loader(commit_needed=True) cf = self.client_factory_handler() From 85b3e8bf8681b35dfcc74a5187708a4834c35d9b Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 5 Jul 2019 15:31:27 +0000 Subject: [PATCH 02/10] =?UTF-8?q?Bump=20version:=200.8.36=20=E2=86=92=200.?= =?UTF-8?q?8.37?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 707792319..1591641c8 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.36 +current_version = 0.8.37 commit = True tag = False diff --git a/setup.py b/setup.py index babd71865..c768e88d2 100644 --- a/setup.py +++ b/setup.py @@ -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.36', + version = '0.8.37', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From f6e017ab5936e2dd6e567ce8bb6142af7321440e Mon Sep 17 00:00:00 2001 From: Jay McConnell Date: Mon, 8 Jul 2019 08:31:03 -0700 Subject: [PATCH 03/10] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 735c18a18..23f3b39f5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## What is taskcat? **taskcat** is a tool that tests AWS CloudFormation templates. It deploys your AWS CloudFormation template in multiple AWS Regions and generates a report with a pass/fail grade for each region. You can specify the regions and number of Availability Zones you want to include in the test, and pass in parameter values from your AWS CloudFormation template. taskcat is implemented as a Python class that you import, instantiate, and run. -TestCat was developed by the AWS QuickStart team to test AWS CloudFormation templates that automatically deploy workloads on AWS. We’re pleased to make the tool available to all developers who want to validate their custom AWS CloudFormation +taskcat was developed by the AWS QuickStart team to test AWS CloudFormation templates that automatically deploy workloads on AWS. We’re pleased to make the tool available to all developers who want to validate their custom AWS CloudFormation templates across AWS Regions ### Support From 916bdde4763d754577860acef84ca0bf26a05104 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 8 Jul 2019 15:43:02 +0000 Subject: [PATCH 04/10] =?UTF-8?q?Bump=20version:=200.8.37=20=E2=86=92=200.?= =?UTF-8?q?8.38?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1591641c8..c60d36bc4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.37 +current_version = 0.8.38 commit = True tag = False diff --git a/setup.py b/setup.py index c768e88d2..e79ce691f 100644 --- a/setup.py +++ b/setup.py @@ -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.37', + version = '0.8.38', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 67c5c9d6568b4a19e288acd160bb9d6367accfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denny=20Sch=C3=A4fer?= Date: Thu, 18 Jul 2019 15:27:41 +0200 Subject: [PATCH 05/10] Use wait logic to create taskcat S3 auto_bucket The current implementation of S3 bucket creation plus tagging has a reproducible issue: botocore.errorfactory.NoSuchBucket: An error occurred (NoSuchBucket) when calling the PutBucketTagging operation: The specified bucket does not exist This happens because the bucket we try to tag doesn't exist yet. The changed code uses a bucket_exists waiter to determine if the bucket exists which fixes the above mentioned behavior. --- taskcat/stacker.py | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/taskcat/stacker.py b/taskcat/stacker.py index 6a45b3f3d..ef7988cf4 100644 --- a/taskcat/stacker.py +++ b/taskcat/stacker.py @@ -429,33 +429,31 @@ def stage_in_s3(self, taskcat_cfg): auto_bucket = auto_bucket[:self._max_bucket_name_length] if self.get_default_region(): print('{0}Creating bucket {1} in {2}'.format(PrintMsg.INFO, auto_bucket, self.get_default_region())) - if self.get_default_region() == 'us-east-1': - response = s3_client.create_bucket(ACL=bucket_or_object_acl, - Bucket=auto_bucket) - else: - response = s3_client.create_bucket(ACL=bucket_or_object_acl, - Bucket=auto_bucket, - CreateBucketConfiguration={ - 'LocationConstraint': self.get_default_region() - }) - self.set_s3bucket_type('auto') - else: - raise TaskCatException("Default_region = " + self.get_default_region()) + try: + if self.get_default_region() == 'us-east-1': + s3_client.create_bucket(ACL=bucket_or_object_acl, + Bucket=auto_bucket) + else: + s3_client.create_bucket(ACL=bucket_or_object_acl, + Bucket=auto_bucket, + CreateBucketConfiguration={ + 'LocationConstraint': self.get_default_region() + }) - if response['ResponseMetadata']['HTTPStatusCode'] is 200: - print(PrintMsg.INFO + "Staging Bucket => [%s]" % auto_bucket) - self.set_s3bucket(auto_bucket) - else: - print('{0}Creating bucket {1} in {2}'.format(PrintMsg.INFO, auto_bucket, self.get_default_region())) - response = s3_client.create_bucket(ACL=bucket_or_object_acl, - Bucket=auto_bucket, - CreateBucketConfiguration={ - 'LocationConstraint': self.get_default_region()}) + s3_client.get_waiter('bucket_exists').wait(Bucket=auto_bucket) - if response['ResponseMetadata']['HTTPStatusCode'] is 200: + self.set_s3bucket_type('auto') print(PrintMsg.INFO + "Staging Bucket => [%s]" % auto_bucket) self.set_s3bucket(auto_bucket) + except Exception as e: + print(PrintMsg.ERROR + "Bucket (%s) creation failed" % auto_bucket) + if self.verbose: + print(PrintMsg.DEBUG + str(e)) + raise + else: + raise TaskCatException("Default_region = " + self.get_default_region()) + if self.tags: s3_client.put_bucket_tagging( Bucket=auto_bucket, From 8980ee652066a4a837b061e4f59411d03075d684 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 19 Jul 2019 17:38:26 +0000 Subject: [PATCH 06/10] =?UTF-8?q?Bump=20version:=200.8.38=20=E2=86=92=200.?= =?UTF-8?q?8.39?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c60d36bc4..67e60bad9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.38 +current_version = 0.8.39 commit = True tag = False diff --git a/setup.py b/setup.py index e79ce691f..06050e68d 100644 --- a/setup.py +++ b/setup.py @@ -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.38', + version = '0.8.39', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', From 1a856b4fd8be117f8e457c4f619f8fce50014d24 Mon Sep 17 00:00:00 2001 From: Andrew Glenn Date: Mon, 22 Jul 2019 00:22:17 -0500 Subject: [PATCH 07/10] AMIUpdater: Custom exception for no filters; exiting 0; tests --- bin/amiupdater | 4 +++- taskcat/amiupdater.py | 11 +++++++++-- tests/unittest/test_amiupdater.py | 10 ++++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/bin/amiupdater b/bin/amiupdater index b732b7f0e..419304821 100755 --- a/bin/amiupdater +++ b/bin/amiupdater @@ -2,7 +2,7 @@ import sys import os import argparse -from taskcat.amiupdater import AMIUpdater, AMIUpdaterFatalException, AMIUpdaterCommitNeededException +from taskcat.amiupdater import AMIUpdater, AMIUpdaterFatalException, AMIUpdaterCommitNeededException, AMIUpdaterNoFiltersException from taskcat.colored_console import PrintMsg def exit(code): @@ -48,3 +48,5 @@ if __name__ == "__main__": exit(100) except AMIUpdaterFatalException: exit(1) + except AMIUpdaterNoFiltersException: + exit(0) diff --git a/taskcat/amiupdater.py b/taskcat/amiupdater.py index 4b7d7ea71..d086bf9fa 100644 --- a/taskcat/amiupdater.py +++ b/taskcat/amiupdater.py @@ -17,7 +17,14 @@ class AMIUpdaterFatalException(TaskCatException): """Raised when AMIUpdater experiences a fatal error""" - pass + def __init__(self, message=None): + if message: + print("{} {}".format(PrintMsg.ERROR, message)) + +class AMIUpdaterNoFiltersException(TaskCatException): + def __init__(self, message=None): + if message: + print("{} {}".format(PrintMsg.ERROR, message)) class AMIUpdaterCommitNeededException(TaskCatException): pass @@ -131,7 +138,7 @@ def fetch_latest_amis(cls): # Create a ThreadPool, size is the number of regions. if len(RegionalCodename.objects()) == 0: - raise AMIUpdaterFatalException("No AMI filters were found. Nothing to fetch from the EC2 API.") + raise AMIUpdaterNoFiltersException("No AMI filters were found. Nothing to fetch from the EC2 API.") pool = ThreadPool(len(TemplateClass.regions())) # For reach RegionalCodename that we've generated.... diff --git a/tests/unittest/test_amiupdater.py b/tests/unittest/test_amiupdater.py index f00c3ba25..36793062e 100644 --- a/tests/unittest/test_amiupdater.py +++ b/tests/unittest/test_amiupdater.py @@ -794,15 +794,17 @@ def describe_images(self, Filters): class TestAMIUpdater(unittest.TestCase): - def _module_loader(self, return_module=False, commit_needed=False): + def _module_loader(self, return_module=False, commit_needed=False, no_filters=False): try: del sys.modules['taskcat.amiupdater'] except KeyError: pass - from taskcat.amiupdater import AMIUpdater, AMIUpdaterFatalException, AMIUpdaterCommitNeededException + from taskcat.amiupdater import AMIUpdater, AMIUpdaterFatalException, AMIUpdaterCommitNeededException, AMIUpdaterNoFiltersException module_tuple = (AMIUpdater, AMIUpdaterFatalException) if commit_needed: module_tuple += (AMIUpdaterCommitNeededException,) + if no_filters: + module_tuple += (AMIUpdaterNoFiltersException,) if return_module: import taskcat.amiupdater module_tuple += (taskcat.amiupdater,) @@ -1101,7 +1103,7 @@ def test_invalid_region_exception(self): self.assertRaises(AMIUpdaterFatalException, a.update_amis) def test_no_filters_exception(self): - au, AMIUpdaterFatalException = self._module_loader() + au, _, AMIUpdaterNoFiltersException = self._module_loader(no_filters=True) cf = self.client_factory_handler() template_file = self.create_ephemeral_template() amiupdater_args = { @@ -1110,7 +1112,7 @@ def test_no_filters_exception(self): "client_factory": cf } a = au(**amiupdater_args) - self.assertRaises(AMIUpdaterFatalException, a.update_amis) + self.assertRaises(AMIUpdaterNoFiltersException, a.update_amis) def test_APIResults_lessthan_comparison_standard(self): from taskcat.amiupdater import APIResultsData From 6fc26f353343f6943f534c02defbfb57a1020afd Mon Sep 17 00:00:00 2001 From: Andrew Glenn Date: Mon, 22 Jul 2019 10:33:17 -0500 Subject: [PATCH 08/10] Signature to lowercase. Fixes #271 --- taskcat/common_utils.py | 2 +- taskcat/stacker.py | 2 +- taskcat_outputs/index.html | 113 ++++++++++++++++++ ...askcat-json-55c08ae1-us-east-1-cfnlogs.txt | 27 +++++ ...askcat-json-704195e0-us-east-1-cfnlogs.txt | 27 +++++ ...askcat-yaml-55c08ae1-us-east-1-cfnlogs.txt | 27 +++++ ...askcat-yaml-704195e0-us-east-1-cfnlogs.txt | 27 +++++ 7 files changed, 223 insertions(+), 2 deletions(-) create mode 100644 taskcat_outputs/index.html create mode 100644 taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt create mode 100644 taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt create mode 100644 taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt create mode 100644 taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt diff --git a/taskcat/common_utils.py b/taskcat/common_utils.py index 97c6fdbc5..05b58423d 100644 --- a/taskcat/common_utils.py +++ b/taskcat/common_utils.py @@ -34,7 +34,7 @@ def parse_stack_info(self): """ stack_info = dict() region_re = re.compile('(?<=:)(.\w-.+(\w*)-\d)(?=:)') - stack_name_re = re.compile('(?<=:stack/)(tCaT.*.)(?=/)') + stack_name_re = re.compile('(?<=:stack/)(tCaT.*.)(?=/)', re.IGNORECASE) stack_info['region'] = self.regxfind(region_re, self.stack_name) stack_info['stack_name'] = self.regxfind(stack_name_re, self.stack_name) return stack_info diff --git a/taskcat/stacker.py b/taskcat/stacker.py index ef7988cf4..355eaf25d 100644 --- a/taskcat/stacker.py +++ b/taskcat/stacker.py @@ -68,7 +68,7 @@ _run_mode = 0 version = __version__ -sig = base64.b64decode("dENhVA==").decode() +sig = base64.b64decode("dGNhdA==").decode() jobid = str(uuid.uuid4()) ''' diff --git a/taskcat_outputs/index.html b/taskcat_outputs/index.html new file mode 100644 index 000000000..ba8b3458e --- /dev/null +++ b/taskcat_outputs/index.html @@ -0,0 +1,113 @@ + + + + + + TaskCat Report + + + + + + + + + + + +
+
+ + GitHub Repo: https://github.com/aws-quickstart/taskcat +
+
+ + Documentation: http://taskcat.io +
+
+ Tested on: Monday - Jul,22,2019 @ 10:46:36 +
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +

+
+ Test Name + + Tested Region + + Stack Name + + Tested Results + + Test Logs +
+

+ taskcat-json +

+
+ us-east-1 + + tcat-tag-taskcat-json-704195e0 + + CREATE_COMPLETE + + + View Logs + +
+

+ taskcat-yaml +

+
+ us-east-1 + + tcat-tag-taskcat-yaml-704195e0 + + CREATE_COMPLETE + + + View Logs + +
\ No newline at end of file diff --git a/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt new file mode 100644 index 000000000..f24ae79d0 --- /dev/null +++ b/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt @@ -0,0 +1,27 @@ +----------------------------------------------------------------------------- +Region: us-east-1 +StackName: tcat-tag-taskcat-json-55c08ae1 +***************************************************************************** +ResourceStatusReason: +Stack launch was successful +***************************************************************************** +***************************************************************************** +Events: +TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason +-------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- +2019-07-22 15:43:40.174000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-json-55c08ae1 +2019-07-22 15:43:37.757000+00:00 CREATE_COMPLETE Custom::GenerateID GetID +2019-07-22 15:43:37.312000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated +2019-07-22 15:43:34.216000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID +2019-07-22 15:43:31.364000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID +2019-07-22 15:43:31.116000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated +2019-07-22 15:43:30.513000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID +2019-07-22 15:43:27.699000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:43:15.180000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated +2019-07-22 15:43:14.659000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:43:10.929000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-json-55c08ae1 User Initiated +***************************************************************************** +----------------------------------------------------------------------------- +Tested on: Monday, 22. July 2019 10:43AM +----------------------------------------------------------------------------- + diff --git a/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt new file mode 100644 index 000000000..01c5c2a3b --- /dev/null +++ b/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt @@ -0,0 +1,27 @@ +----------------------------------------------------------------------------- +Region: us-east-1 +StackName: tcat-tag-taskcat-json-704195e0 +***************************************************************************** +ResourceStatusReason: +Stack launch was successful +***************************************************************************** +***************************************************************************** +Events: +TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason +-------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- +2019-07-22 15:46:04.411000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-json-704195e0 +2019-07-22 15:46:01.390000+00:00 CREATE_COMPLETE Custom::GenerateID GetID +2019-07-22 15:46:00.791000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated +2019-07-22 15:45:57.928000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID +2019-07-22 15:45:55.111000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID +2019-07-22 15:45:54.839000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated +2019-07-22 15:45:54.174000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID +2019-07-22 15:45:51.079000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:45:35.522000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated +2019-07-22 15:45:34.946000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:45:30.524000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-json-704195e0 User Initiated +***************************************************************************** +----------------------------------------------------------------------------- +Tested on: Monday, 22. July 2019 10:46AM +----------------------------------------------------------------------------- + diff --git a/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt new file mode 100644 index 000000000..f1058fdcb --- /dev/null +++ b/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt @@ -0,0 +1,27 @@ +----------------------------------------------------------------------------- +Region: us-east-1 +StackName: tcat-tag-taskcat-yaml-55c08ae1 +***************************************************************************** +ResourceStatusReason: +Stack launch was successful +***************************************************************************** +***************************************************************************** +Events: +TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason +-------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- +2019-07-22 15:43:41.432000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-55c08ae1 +2019-07-22 15:43:39.230000+00:00 CREATE_COMPLETE Custom::GenerateID GetID +2019-07-22 15:43:38.898000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated +2019-07-22 15:43:36.171000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID +2019-07-22 15:43:33.885000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID +2019-07-22 15:43:33.752000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated +2019-07-22 15:43:33.327000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID +2019-07-22 15:43:30.093000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:43:15.591000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated +2019-07-22 15:43:15.149000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:43:11.316000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-55c08ae1 User Initiated +***************************************************************************** +----------------------------------------------------------------------------- +Tested on: Monday, 22. July 2019 10:43AM +----------------------------------------------------------------------------- + diff --git a/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt new file mode 100644 index 000000000..264172af7 --- /dev/null +++ b/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt @@ -0,0 +1,27 @@ +----------------------------------------------------------------------------- +Region: us-east-1 +StackName: tcat-tag-taskcat-yaml-704195e0 +***************************************************************************** +ResourceStatusReason: +Stack launch was successful +***************************************************************************** +***************************************************************************** +Events: +TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason +-------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- +2019-07-22 15:46:01.785000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-704195e0 +2019-07-22 15:45:59.575000+00:00 CREATE_COMPLETE Custom::GenerateID GetID +2019-07-22 15:45:59.127000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated +2019-07-22 15:45:56.704000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID +2019-07-22 15:45:54.237000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID +2019-07-22 15:45:53.903000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated +2019-07-22 15:45:53.058000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID +2019-07-22 15:45:50.263000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:45:35.520000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated +2019-07-22 15:45:35.198000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole +2019-07-22 15:45:30.891000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-704195e0 User Initiated +***************************************************************************** +----------------------------------------------------------------------------- +Tested on: Monday, 22. July 2019 10:46AM +----------------------------------------------------------------------------- + From 6eb6d279862d0fa192c765485bf9de7d0f1885e7 Mon Sep 17 00:00:00 2001 From: Andrew Glenn Date: Mon, 22 Jul 2019 12:58:34 -0500 Subject: [PATCH 09/10] Adding v0.8 -> v0.9 migration message and placeholder readme --- README_v0.9_MIGRATION.md | 1 + taskcat/stacker.py | 14 ++- taskcat_outputs/index.html | 113 ------------------ ...askcat-json-55c08ae1-us-east-1-cfnlogs.txt | 27 ----- ...askcat-json-704195e0-us-east-1-cfnlogs.txt | 27 ----- ...askcat-yaml-55c08ae1-us-east-1-cfnlogs.txt | 27 ----- ...askcat-yaml-704195e0-us-east-1-cfnlogs.txt | 27 ----- 7 files changed, 13 insertions(+), 223 deletions(-) create mode 100644 README_v0.9_MIGRATION.md delete mode 100644 taskcat_outputs/index.html delete mode 100644 taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt delete mode 100644 taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt delete mode 100644 taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt delete mode 100644 taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt diff --git a/README_v0.9_MIGRATION.md b/README_v0.9_MIGRATION.md new file mode 100644 index 000000000..48cdce852 --- /dev/null +++ b/README_v0.9_MIGRATION.md @@ -0,0 +1 @@ +placeholder diff --git a/taskcat/stacker.py b/taskcat/stacker.py index 355eaf25d..03d1c031c 100644 --- a/taskcat/stacker.py +++ b/taskcat/stacker.py @@ -1662,7 +1662,14 @@ def interface(self): def checkforupdate(silent=False): update_needed = False - def _print_upgrade_msg(newversion): + def _print_upgrade_msg(newversion, nine=False): + if nine: + print("{} !!!!!".format(PrintMsg.INFO)) + print("{} Breaking changes have been introduced to the taskcat CLI arguments in the v0.9.x branch.".format(PrintMsg.INFO)) + print("{} Please review the migration document *BEFORE* upgrading to v0.9.x!".format(PrintMsg.INFO)) + print("{} - https://github.com/aws-quickstart/taskcat/blob/master/README_v0.9_MIGRATION.md".format(PrintMsg.INFO)) + print("{} !!!!!".format(PrintMsg.INFO)) + print('\n') print("version %s" % version) print('\n') print("{} A newer version of {} is available ({})".format( @@ -1674,16 +1681,19 @@ def _print_upgrade_msg(newversion): print('\n') if _run_mode > 0: + nine=False if 'dev' not in version: current_version = get_pip_version( 'https://pypi.org/pypi/taskcat/json') if version not in current_version: update_needed = True + if '0.9' in current_version: + nine=True if not silent: if not update_needed: print("version %s" % version) else: - _print_upgrade_msg(current_version) + _print_upgrade_msg(current_version, nine) else: print(PrintMsg.INFO + "Using local source (development mode) \n") diff --git a/taskcat_outputs/index.html b/taskcat_outputs/index.html deleted file mode 100644 index ba8b3458e..000000000 --- a/taskcat_outputs/index.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - TaskCat Report - - - - - - - - - - - -
-
- - GitHub Repo: https://github.com/aws-quickstart/taskcat -
-
- - Documentation: http://taskcat.io -
-
- Tested on: Monday - Jul,22,2019 @ 10:46:36 -
- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- -

-
- Test Name - - Tested Region - - Stack Name - - Tested Results - - Test Logs -
-

- taskcat-json -

-
- us-east-1 - - tcat-tag-taskcat-json-704195e0 - - CREATE_COMPLETE - - - View Logs - -
-

- taskcat-yaml -

-
- us-east-1 - - tcat-tag-taskcat-yaml-704195e0 - - CREATE_COMPLETE - - - View Logs - -
\ No newline at end of file diff --git a/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt deleted file mode 100644 index f24ae79d0..000000000 --- a/taskcat_outputs/tcat-tag-taskcat-json-55c08ae1-us-east-1-cfnlogs.txt +++ /dev/null @@ -1,27 +0,0 @@ ------------------------------------------------------------------------------ -Region: us-east-1 -StackName: tcat-tag-taskcat-json-55c08ae1 -***************************************************************************** -ResourceStatusReason: -Stack launch was successful -***************************************************************************** -***************************************************************************** -Events: -TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason --------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- -2019-07-22 15:43:40.174000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-json-55c08ae1 -2019-07-22 15:43:37.757000+00:00 CREATE_COMPLETE Custom::GenerateID GetID -2019-07-22 15:43:37.312000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated -2019-07-22 15:43:34.216000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID -2019-07-22 15:43:31.364000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID -2019-07-22 15:43:31.116000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated -2019-07-22 15:43:30.513000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID -2019-07-22 15:43:27.699000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:43:15.180000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated -2019-07-22 15:43:14.659000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:43:10.929000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-json-55c08ae1 User Initiated -***************************************************************************** ------------------------------------------------------------------------------ -Tested on: Monday, 22. July 2019 10:43AM ------------------------------------------------------------------------------ - diff --git a/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt deleted file mode 100644 index 01c5c2a3b..000000000 --- a/taskcat_outputs/tcat-tag-taskcat-json-704195e0-us-east-1-cfnlogs.txt +++ /dev/null @@ -1,27 +0,0 @@ ------------------------------------------------------------------------------ -Region: us-east-1 -StackName: tcat-tag-taskcat-json-704195e0 -***************************************************************************** -ResourceStatusReason: -Stack launch was successful -***************************************************************************** -***************************************************************************** -Events: -TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason --------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- -2019-07-22 15:46:04.411000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-json-704195e0 -2019-07-22 15:46:01.390000+00:00 CREATE_COMPLETE Custom::GenerateID GetID -2019-07-22 15:46:00.791000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated -2019-07-22 15:45:57.928000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID -2019-07-22 15:45:55.111000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID -2019-07-22 15:45:54.839000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated -2019-07-22 15:45:54.174000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID -2019-07-22 15:45:51.079000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:45:35.522000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated -2019-07-22 15:45:34.946000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:45:30.524000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-json-704195e0 User Initiated -***************************************************************************** ------------------------------------------------------------------------------ -Tested on: Monday, 22. July 2019 10:46AM ------------------------------------------------------------------------------ - diff --git a/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt deleted file mode 100644 index f1058fdcb..000000000 --- a/taskcat_outputs/tcat-tag-taskcat-yaml-55c08ae1-us-east-1-cfnlogs.txt +++ /dev/null @@ -1,27 +0,0 @@ ------------------------------------------------------------------------------ -Region: us-east-1 -StackName: tcat-tag-taskcat-yaml-55c08ae1 -***************************************************************************** -ResourceStatusReason: -Stack launch was successful -***************************************************************************** -***************************************************************************** -Events: -TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason --------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- -2019-07-22 15:43:41.432000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-55c08ae1 -2019-07-22 15:43:39.230000+00:00 CREATE_COMPLETE Custom::GenerateID GetID -2019-07-22 15:43:38.898000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated -2019-07-22 15:43:36.171000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID -2019-07-22 15:43:33.885000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID -2019-07-22 15:43:33.752000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated -2019-07-22 15:43:33.327000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID -2019-07-22 15:43:30.093000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:43:15.591000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated -2019-07-22 15:43:15.149000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:43:11.316000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-55c08ae1 User Initiated -***************************************************************************** ------------------------------------------------------------------------------ -Tested on: Monday, 22. July 2019 10:43AM ------------------------------------------------------------------------------ - diff --git a/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt b/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt deleted file mode 100644 index 264172af7..000000000 --- a/taskcat_outputs/tcat-tag-taskcat-yaml-704195e0-us-east-1-cfnlogs.txt +++ /dev/null @@ -1,27 +0,0 @@ ------------------------------------------------------------------------------ -Region: us-east-1 -StackName: tcat-tag-taskcat-yaml-704195e0 -***************************************************************************** -ResourceStatusReason: -Stack launch was successful -***************************************************************************** -***************************************************************************** -Events: -TimeStamp ResourceStatus ResourceType LogicalResourceId ResourceStatusReason --------------------------------- ------------------ -------------------------- ------------------------------ --------------------------- -2019-07-22 15:46:01.785000+00:00 CREATE_COMPLETE AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-704195e0 -2019-07-22 15:45:59.575000+00:00 CREATE_COMPLETE Custom::GenerateID GetID -2019-07-22 15:45:59.127000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID Resource creation Initiated -2019-07-22 15:45:56.704000+00:00 CREATE_IN_PROGRESS Custom::GenerateID GetID -2019-07-22 15:45:54.237000+00:00 CREATE_COMPLETE AWS::Lambda::Function GenID -2019-07-22 15:45:53.903000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID Resource creation Initiated -2019-07-22 15:45:53.058000+00:00 CREATE_IN_PROGRESS AWS::Lambda::Function GenID -2019-07-22 15:45:50.263000+00:00 CREATE_COMPLETE AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:45:35.520000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole Resource creation Initiated -2019-07-22 15:45:35.198000+00:00 CREATE_IN_PROGRESS AWS::IAM::Role LambdaExecutionRole -2019-07-22 15:45:30.891000+00:00 CREATE_IN_PROGRESS AWS::CloudFormation::Stack tcat-tag-taskcat-yaml-704195e0 User Initiated -***************************************************************************** ------------------------------------------------------------------------------ -Tested on: Monday, 22. July 2019 10:46AM ------------------------------------------------------------------------------ - From a88dee0aa89cfbc91d59bc99920ca6abd047c74c Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 22 Jul 2019 18:15:39 +0000 Subject: [PATCH 10/10] =?UTF-8?q?Bump=20version:=200.8.39=20=E2=86=92=200.?= =?UTF-8?q?8.40?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 67e60bad9..c4e87e76d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.8.39 +current_version = 0.8.40 commit = True tag = False diff --git a/setup.py b/setup.py index 06050e68d..77af0c00d 100644 --- a/setup.py +++ b/setup.py @@ -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.39', + version = '0.8.40', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers',