insert test template into cloud formation at all 3 template positions and log

pull/263/head
Frostebite 2021-05-02 02:14:43 +01:00
parent 89a0db42cc
commit 97d1a5bb54
3 changed files with 17 additions and 23 deletions

19
dist/index.js vendored
View File

@ -485,8 +485,7 @@ class AWS {
const template1 = ` const template1 = `
AWSSecretAccessKeyssss: AWSSecretAccessKeyssss:
Type: String Type: String
Default: '0' Default: '0'`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp1), taskDefCloudFormation.slice(0, indexp1),
template1, template1,
@ -494,12 +493,11 @@ class AWS {
].join(''); ].join('');
const indexp2 = taskDefCloudFormation.search(p2string) + p2string.length + '\n'.length; const indexp2 = taskDefCloudFormation.search(p2string) + p2string.length + '\n'.length;
const template2 = ` const template2 = `
TestSec: TestSec:
Type: AWS::SecretsManager::Secret Type: AWS::SecretsManager::Secret
Properties: Properties:
Name: !Join [ "", [ 'testsec', !Ref BUILDID ] ] Name: !Join [ "", [ 'testsec', !Ref BUILDID ] ]
SecretString: !Ref AWSSecretAccessKey SecretString: !Ref AWSSecretAccessKey`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp2), taskDefCloudFormation.slice(0, indexp2),
template2, template2,
@ -507,9 +505,8 @@ class AWS {
].join(''); ].join('');
const indexp3 = taskDefCloudFormation.search(p3string) + p3string.length + '\n'.length; const indexp3 = taskDefCloudFormation.search(p3string) + p3string.length + '\n'.length;
const template3 = ` const template3 = `
- Name: 'test' - Name: 'test'
ValueFrom: !Ref GithubTokenSecret ValueFrom: !Ref GithubTokenSecret`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp3), taskDefCloudFormation.slice(0, indexp3),
template3, template3,

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -340,8 +340,7 @@ class AWS {
const template1 = ` const template1 = `
AWSSecretAccessKeyssss: AWSSecretAccessKeyssss:
Type: String Type: String
Default: '0' Default: '0'`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp1), taskDefCloudFormation.slice(0, indexp1),
template1, template1,
@ -349,12 +348,11 @@ class AWS {
].join(''); ].join('');
const indexp2 = taskDefCloudFormation.search(p2string) + p2string.length + '\n'.length; const indexp2 = taskDefCloudFormation.search(p2string) + p2string.length + '\n'.length;
const template2 = ` const template2 = `
TestSec: TestSec:
Type: AWS::SecretsManager::Secret Type: AWS::SecretsManager::Secret
Properties: Properties:
Name: !Join [ "", [ 'testsec', !Ref BUILDID ] ] Name: !Join [ "", [ 'testsec', !Ref BUILDID ] ]
SecretString: !Ref AWSSecretAccessKey SecretString: !Ref AWSSecretAccessKey`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp2), taskDefCloudFormation.slice(0, indexp2),
template2, template2,
@ -362,9 +360,8 @@ class AWS {
].join(''); ].join('');
const indexp3 = taskDefCloudFormation.search(p3string) + p3string.length + '\n'.length; const indexp3 = taskDefCloudFormation.search(p3string) + p3string.length + '\n'.length;
const template3 = ` const template3 = `
- Name: 'test' - Name: 'test'
ValueFrom: !Ref GithubTokenSecret ValueFrom: !Ref GithubTokenSecret`;
`;
taskDefCloudFormation = [ taskDefCloudFormation = [
taskDefCloudFormation.slice(0, indexp3), taskDefCloudFormation.slice(0, indexp3),
template3, template3,