Streamline code styles (#384)
* feat: streamline code styles * feat: spacing for comments and return statements * chore: enforce camelcase * fix: remove npm lock file * fix: add integrity test * fix: remove logfile * chore: update node in test workflow
This commit is contained in:
@@ -29,6 +29,7 @@ export class AWSCloudFormationTemplates {
|
||||
public static insertAtTemplate(template, insertionKey, insertion) {
|
||||
const index = template.search(insertionKey) + insertionKey.length + '\n'.length;
|
||||
template = [template.slice(0, index), insertion, template.slice(index)].join('');
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,14 +112,7 @@ export class AWSJobStack {
|
||||
CloudRunnerLogger.log('Creating cloud runner job');
|
||||
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();
|
||||
} catch (error) {
|
||||
await AWSError.handleStackCreationFailure(
|
||||
error,
|
||||
CF,
|
||||
taskDefStackName,
|
||||
//taskDefCloudFormation,
|
||||
//parameters,
|
||||
//secrets,
|
||||
);
|
||||
await AWSError.handleStackCreationFailure(error, CF, taskDefStackName);
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ class AWSTaskRunner {
|
||||
const wasSuccessful = exitCode === 0 || (exitCode === undefined && taskData.lastStatus === 'RUNNING');
|
||||
if (wasSuccessful) {
|
||||
CloudRunnerLogger.log(`Cloud runner job has finished successfully`);
|
||||
|
||||
return output;
|
||||
} else {
|
||||
if (taskData.stoppedReason === 'Essential container in task exited' && exitCode === 1) {
|
||||
@@ -135,6 +136,7 @@ class AWSTaskRunner {
|
||||
output,
|
||||
));
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -152,6 +154,7 @@ class AWSTaskRunner {
|
||||
.promise();
|
||||
iterator = records.NextShardIterator || '';
|
||||
({ shouldReadLogs, output } = AWSTaskRunner.logRecords(records, iterator, taskDef, shouldReadLogs, output));
|
||||
|
||||
return { iterator, shouldReadLogs, output };
|
||||
}
|
||||
|
||||
@@ -170,6 +173,7 @@ class AWSTaskRunner {
|
||||
}
|
||||
CloudRunnerLogger.log(`## Status of job: ${taskData.lastStatus}`);
|
||||
}
|
||||
|
||||
return { timestamp, shouldReadLogs };
|
||||
}
|
||||
|
||||
@@ -208,6 +212,7 @@ class AWSTaskRunner {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { shouldReadLogs, output };
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ class AWSBuildEnvironment implements ProviderInterface {
|
||||
if (postRunTaskTimeMs !== undefined)
|
||||
CloudRunnerLogger.log(`Cleanup job time: ${Math.floor((postCleanupTimeMs - postRunTaskTimeMs) / 1000)}s`);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user