def teardown(self): """Teardown scaffolding.""" self.set_env_var("CI", "1") self.logger.info("Tearing down: %s", self.TEST_NAME) with change_dir(self.parallelism_test_dir): run_command(["runway", "destroy"]) self.clean()
def teardown(self): """Teardown scaffolding.""" self.set_env_var('CI', '1') self.logger.info('Tearing down: %s', self.TEST_NAME) with change_dir(self.parallelism_test_dir): run_command(['runway', 'destroy']) self.clean()
def teardown(self): self.logger.info('Tearing down: %s', self.TEST_NAME) self.delete_venv(self.module_dir) with change_dir(self.cdk_test_dir): run_command(['runway', 'destroy']) self.clean() self.unset_env_var('CI')
def teardown(self): """Teardown.""" self.logger.info("Tearing down: %s", self.TEST_NAME) self.delete_venv(self.module_dir) with change_dir(self.staticsite_test_dir): run_command(["runway", "destroy"]) self.clean()
def teardown(self): """Teardown any created resources.""" self.logger.info('Tearing down: %s', self.TEST_NAME) with change_dir(self.base_dir): run_command(['runway', 'destroy']) self.unset_env_var('CI') self.clean()
def deploy_version(self, version): """Deploy provider.""" self.set_tf_version(version) self.copy_template('s3-backend.tf') self.copy_runway('s3') with change_dir(self.base_dir): return run_command(['runway', 'deploy'])
def deploy_backend(self, backend): """Deploy provider.""" self.copy_template('{}-backend.tf'.format(backend)) self.copy_runway('nos3') with change_dir(self.base_dir): return run_command(['runway', 'deploy'])
def deploy(self): """Deploy provider.""" os.mkdir(self.staticsite_test_dir) os.mkdir(os.path.join(self.staticsite_test_dir, self.module_dir)) os.mkdir(os.path.join(self.staticsite_test_dir, self.module_dir, "build")) self.copy_runway("basic-site") with change_dir(self.staticsite_test_dir): return run_command(["runway", "deploy"])
def runway_cmd(self, command, tags): """Run a deploy command based on tags.""" cmd = ['runway', command] for tag in tags: cmd.append('--tag') cmd.append(tag) self.logger.info('Running command: %s', str(cmd)) with change_dir(self.base_dir): return run_command(cmd)
def deploy(self): """Deploy provider.""" os.mkdir(self.staticsite_test_dir) os.mkdir(os.path.join(self.staticsite_test_dir, self.module_dir)) os.mkdir( os.path.join(self.staticsite_test_dir, self.module_dir, 'build')) self.copy_runway('basic-site') with change_dir(self.staticsite_test_dir): return run_command(['runway', 'deploy'])
def run_runway(self, template, command='deploy'): """Deploy serverless template.""" template_dir = os.path.join(self.templates_dir, template) if os.path.isdir(template_dir): self.logger.info('Executing test "%s" in directory "%s"', template, template_dir) with change_dir(template_dir): self.logger.info('Running "runway %s" on %s', command, template_dir) return run_command(['runway', command], self.environment) else: self.logger.error('Directory not found: %s', template_dir) return 1
def run_stacker(self, command='build'): """Deploys the CFN module to create S3 and DynamoDB resources.""" if command not in ('build', 'destroy'): raise ValueError('run_stacker: command must be one of %s' % ['build', 'destroy']) self.logger.info('Running "%s" on tf_state.cfn ...', command) self.logger.debug('tf_state_dir: %s', self.tf_state_dir) with change_dir(self.tf_state_dir): stacker_cmd = [ 'stacker.cmd' if platform.system().lower() == 'windows' else 'stacker', command, '-i', '-r', 'us-east-1' ] if command == 'destroy': stacker_cmd = stacker_cmd + ['-f'] stacker_cmd = stacker_cmd + ['dev-us-east-1.env', 'tfstate.yaml'] self.logger.debug('STACKER_CMD: %s', stacker_cmd) cmd_opts = {'cmd_list': stacker_cmd} return run_command(**cmd_opts) # noqa
def deploy(self): """Deploy provider.""" self.copy_fixture('sampleapp.cfn') self.copy_runway('default-to-series') with change_dir(self.parallelism_test_dir): return run_command(['runway', 'deploy'])
def deploy(self): """Deploy provider.""" self.copy_fixture("sampleapp.cfn") self.copy_runway("default-to-series") with change_dir(self.parallelism_test_dir): return run_command(["runway", "deploy"])
def deploy(self): """Deploy provider.""" self.copy_fixture(self.module_dir) self.copy_runway('multiple-stacks') with change_dir(self.cdk_test_dir): return run_command(['runway', 'deploy'])
def deploy(self): """Deploy provider.""" self.copy_fixture(self.module_dir) self.copy_runway('basic-site') with change_dir(self.staticsite_test_dir): return run_command(['runway', 'deploy'])
def deploy(self): """Deploy provider.""" self.copy_fixture(self.module_dir) self.copy_runway("multiple-stacks") with change_dir(self.cdk_test_dir): return run_command(["runway", "deploy"])
def deploy_provider(self, version): """Deploy provider.""" self.copy_template('provider-version{}.tf'.format(version)) self.copy_runway('s3') with change_dir(self.base_dir): return run_command(['runway', 'deploy'])