filter out empty secret env vars
parent
ec239aa2e7
commit
589eed6f71
|
|
@ -966,6 +966,9 @@ class AWSBuildEnvironment {
|
|||
const cleanupCloudFormation = fs.readFileSync(`${__dirname}/cloud-formations/cloudformation-stack-ttl.yml`, 'utf8');
|
||||
try {
|
||||
for (const secret of secrets) {
|
||||
if (!secret.ParameterValue || secret.ParameterValue === '') {
|
||||
continue;
|
||||
}
|
||||
taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p1 - input', this.getParameterTemplate(secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')));
|
||||
taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p2 - secret', this.getSecretTemplate(secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')));
|
||||
taskDefCloudFormation = this.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', this.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey.replace(/[^\dA-Za-z]/g, '')));
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -121,6 +121,9 @@ class AWSBuildEnvironment implements RemoteBuilderProviderInterface {
|
|||
|
||||
try {
|
||||
for (const secret of secrets) {
|
||||
if (!secret.ParameterValue || secret.ParameterValue === '') {
|
||||
continue;
|
||||
}
|
||||
taskDefCloudFormation = this.insertAtTemplate(
|
||||
taskDefCloudFormation,
|
||||
'p1 - input',
|
||||
|
|
|
|||
Loading…
Reference in New Issue