Add command to fix templates (#21)
* add command to fix templates * replaceAll and lint fixes * fixed menu * fix lint command and run it * add basic error handling for listing of templates * CR suggestions --------- Co-authored-by: Arwid Thornström <arwidt@gmail.com>
This commit is contained in:
co-authored by
Arwid Thornström
parent
bc9ba08e76
commit
724f3905ab
@@ -18,8 +18,8 @@ export const getTestStacksInfo = async (
|
||||
strings.trim(await system.run(`aws cloudformation list-stacks`))
|
||||
);
|
||||
|
||||
const allStacks = await Promise.all(
|
||||
stacks.StackSummaries.map(async item => {
|
||||
const allStacks = (await Promise.all(
|
||||
stacks.StackSummaries.map(async (item) => {
|
||||
if (
|
||||
item.StackName.indexOf('photowall-test-') > -1 &&
|
||||
[
|
||||
@@ -29,7 +29,7 @@ export const getTestStacksInfo = async (
|
||||
'UPDATE_FAILED',
|
||||
'CREATE_FAILED',
|
||||
'CREATE_IN_PROGRESS',
|
||||
'ROLLBACK_COMPLETE'
|
||||
'ROLLBACK_COMPLETE',
|
||||
].includes(item.StackStatus)
|
||||
) {
|
||||
try {
|
||||
@@ -40,7 +40,7 @@ export const getTestStacksInfo = async (
|
||||
)
|
||||
)
|
||||
);
|
||||
const sourceStage = pipeline.pipeline.stages.filter(stage => {
|
||||
const sourceStage = pipeline.pipeline.stages.filter((stage) => {
|
||||
return stage.name === 'Source';
|
||||
});
|
||||
const branch =
|
||||
@@ -53,7 +53,7 @@ export const getTestStacksInfo = async (
|
||||
drift_status: item.DriftInformation.StackDriftStatus,
|
||||
branch: branch,
|
||||
updated: lastUpdated,
|
||||
created: item.CreationTime
|
||||
created: item.CreationTime,
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
@@ -62,12 +62,12 @@ export const getTestStacksInfo = async (
|
||||
drift_status: '',
|
||||
branch: '',
|
||||
updated: '',
|
||||
created: item.CreationTime
|
||||
created: item.CreationTime,
|
||||
};
|
||||
}
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
})
|
||||
) as Stack[] | null;
|
||||
)) as Stack[] | null;
|
||||
return allStacks.filter(Boolean);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user