File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ function removeIgnoredAttributes(taskDef) {
294
294
return taskDef;
295
295
}
296
296
297
- function maintainAppMeshConfiguration (taskDef) {
297
+ function maintainValidObjects (taskDef) {
298
298
if (validateProxyConfigurations(taskDef)) {
299
299
taskDef.proxyConfiguration.properties.forEach((property, index, arr) => {
300
300
if (!('value' in property)) {
@@ -305,6 +305,18 @@ function maintainAppMeshConfiguration(taskDef) {
305
305
}
306
306
});
307
307
}
308
+
309
+ if(taskDef && taskDef.containerDefinitions){
310
+ taskDef.containerDefinitions.forEach((container) => {
311
+ if(container.environment){
312
+ container.environment.forEach((property, index, arr) => {
313
+ if (!('value' in property)) {
314
+ arr[index].value = '';
315
+ }
316
+ });
317
+ }
318
+ });
319
+ }
308
320
return taskDef;
309
321
}
310
322
@@ -418,7 +430,7 @@ async function run() {
418
430
taskDefinitionFile :
419
431
path.join(process.env.GITHUB_WORKSPACE, taskDefinitionFile);
420
432
const fileContents = fs.readFileSync(taskDefPath, 'utf8');
421
- const taskDefContents = maintainAppMeshConfiguration (removeIgnoredAttributes(cleanNullKeys(yaml.parse(fileContents))));
433
+ const taskDefContents = maintainValidObjects (removeIgnoredAttributes(cleanNullKeys(yaml.parse(fileContents))));
422
434
let registerResponse;
423
435
try {
424
436
registerResponse = await ecs.registerTaskDefinition(taskDefContents).promise();
You can’t perform that action at this time.
0 commit comments