refactoring remote builder
parent
e9a85b886f
commit
2002cc71f9
|
|
@ -140,6 +140,7 @@ Resources:
|
||||||
Environment:
|
Environment:
|
||||||
- Name: ALLOW_EMPTY_PASSWORD
|
- Name: ALLOW_EMPTY_PASSWORD
|
||||||
Value: 'yes'
|
Value: 'yes'
|
||||||
|
# template - env vars
|
||||||
MountPoints:
|
MountPoints:
|
||||||
- SourceVolume: efs-data
|
- SourceVolume: efs-data
|
||||||
ContainerPath: !Ref EFSMountDirectory
|
ContainerPath: !Ref EFSMountDirectory
|
||||||
|
|
|
||||||
|
|
@ -1281,6 +1281,19 @@ class AWS {
|
||||||
parameterTemplate,
|
parameterTemplate,
|
||||||
taskDefCloudFormation.slice(index),
|
taskDefCloudFormation.slice(index),
|
||||||
].join('');
|
].join('');
|
||||||
|
const insertionStringKeyContainerDef = 'template - env vars';
|
||||||
|
const indexContainerDef = taskDefCloudFormation.search(insertionStringKeyContainerDef) +
|
||||||
|
insertionStringKeyContainerDef.length +
|
||||||
|
'\n'.length;
|
||||||
|
const parameterContainerDefTemplate = `
|
||||||
|
- Name: '${environmentVariable.name}'
|
||||||
|
ValueFrom: !Ref ${environmentVariable.name}
|
||||||
|
`;
|
||||||
|
taskDefCloudFormation = [
|
||||||
|
taskDefCloudFormation.slice(0, indexContainerDef),
|
||||||
|
parameterContainerDefTemplate,
|
||||||
|
taskDefCloudFormation.slice(indexContainerDef),
|
||||||
|
].join('');
|
||||||
}
|
}
|
||||||
core.info(taskDefCloudFormation);
|
core.info(taskDefCloudFormation);
|
||||||
const mappedSecrets = new Array();
|
const mappedSecrets = new Array();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -116,6 +116,20 @@ class AWS {
|
||||||
parameterTemplate,
|
parameterTemplate,
|
||||||
taskDefCloudFormation.slice(index),
|
taskDefCloudFormation.slice(index),
|
||||||
].join('');
|
].join('');
|
||||||
|
const insertionStringKeyContainerDef = 'template - env vars';
|
||||||
|
const indexContainerDef =
|
||||||
|
taskDefCloudFormation.search(insertionStringKeyContainerDef) +
|
||||||
|
insertionStringKeyContainerDef.length +
|
||||||
|
'\n'.length;
|
||||||
|
const parameterContainerDefTemplate = `
|
||||||
|
- Name: '${environmentVariable.name}'
|
||||||
|
ValueFrom: !Ref ${environmentVariable.name}
|
||||||
|
`;
|
||||||
|
taskDefCloudFormation = [
|
||||||
|
taskDefCloudFormation.slice(0, indexContainerDef),
|
||||||
|
parameterContainerDefTemplate,
|
||||||
|
taskDefCloudFormation.slice(indexContainerDef),
|
||||||
|
].join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(taskDefCloudFormation);
|
core.info(taskDefCloudFormation);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue