pull/235/head
mdugdale 2021-04-03 14:03:30 +01:00
parent 0f0e8c8f5a
commit 9aae530430
3 changed files with 15 additions and 15 deletions

14
dist/index.js vendored
View File

@ -483,11 +483,11 @@ class AWS {
], ],
}).promise(); }).promise();
core.info('Creating build cluster...'); core.info('Creating build cluster...');
const taskDefStackNameTTL = `${taskDefStackName}-cleanup`; const cleanupTaskDefStackName = `${taskDefStackName}-cleanup`;
const ttlCloudFormation = fs.readFileSync(`${__dirname}/cloudformation-stack-ttl.yml`, 'utf8'); const cleanupCloudFormation = fs.readFileSync(`${__dirname}/cloudformation-stack-ttl.yml`, 'utf8');
yield CF.createStack({ yield CF.createStack({
StackName: taskDefStackNameTTL, StackName: cleanupTaskDefStackName,
TemplateBody: ttlCloudFormation, TemplateBody: cleanupCloudFormation,
Capabilities: ['CAPABILITY_IAM'], Capabilities: ['CAPABILITY_IAM'],
Parameters: [ Parameters: [
{ {
@ -496,7 +496,7 @@ class AWS {
}, },
{ {
ParameterKey: 'DeleteStackName', ParameterKey: 'DeleteStackName',
ParameterValue: taskDefStackNameTTL, ParameterValue: cleanupTaskDefStackName,
}, },
{ {
ParameterKey: 'TTL', ParameterKey: 'TTL',
@ -523,8 +523,8 @@ class AWS {
return { return {
taskDefStackName, taskDefStackName,
taskDefCloudFormation, taskDefCloudFormation,
taskDefStackNameTTL, taskDefStackNameTTL: cleanupTaskDefStackName,
ttlCloudFormation, ttlCloudFormation: cleanupCloudFormation,
taskDefResources, taskDefResources,
baseResources, baseResources,
}; };

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -338,11 +338,11 @@ class AWS {
}).promise(); }).promise();
core.info('Creating build cluster...'); core.info('Creating build cluster...');
const taskDefStackNameTTL = `${taskDefStackName}-cleanup`; const cleanupTaskDefStackName = `${taskDefStackName}-cleanup`;
const ttlCloudFormation = fs.readFileSync(`${__dirname}/cloudformation-stack-ttl.yml`, 'utf8'); const cleanupCloudFormation = fs.readFileSync(`${__dirname}/cloudformation-stack-ttl.yml`, 'utf8');
await CF.createStack({ await CF.createStack({
StackName: taskDefStackNameTTL, StackName: cleanupTaskDefStackName,
TemplateBody: ttlCloudFormation, TemplateBody: cleanupCloudFormation,
Capabilities: ['CAPABILITY_IAM'], Capabilities: ['CAPABILITY_IAM'],
Parameters: [ Parameters: [
{ {
@ -351,7 +351,7 @@ class AWS {
}, },
{ {
ParameterKey: 'DeleteStackName', ParameterKey: 'DeleteStackName',
ParameterValue: taskDefStackNameTTL, ParameterValue: cleanupTaskDefStackName,
}, },
{ {
ParameterKey: 'TTL', ParameterKey: 'TTL',
@ -381,8 +381,8 @@ class AWS {
return { return {
taskDefStackName, taskDefStackName,
taskDefCloudFormation, taskDefCloudFormation,
taskDefStackNameTTL, taskDefStackNameTTL: cleanupTaskDefStackName,
ttlCloudFormation, ttlCloudFormation: cleanupCloudFormation,
taskDefResources, taskDefResources,
baseResources, baseResources,
}; };