pull/235/head
mdugdale 2021-04-05 14:23:27 +01:00
parent bc8a08fb7f
commit d645916e41
3 changed files with 9 additions and 7 deletions

7
dist/index.js vendored
View File

@ -230,9 +230,9 @@ class AWS {
return __awaiter(this, void 0, void 0, function* () {
try {
const nanoid = nanoid_1.customAlphabet(alphabet, 9);
const buildUid = `${nanoid()}-build-${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform
.replace('Standalone', '')
.replace('standalone', '')}`;
.replace('standalone', '')}-${nanoid()}`;
const branchName = (_a = process.env.GITHUB_REF) === null || _a === void 0 ? void 0 : _a.split('/').reverse()[0];
core.info('Starting part 1/4 (clone from github and restore cache)');
yield this.run(buildUid, buildParameters.awsStackName, 'alpine/git', ['/bin/sh'], [
@ -663,7 +663,7 @@ class AWS {
})
.promise();
iterator = records.NextShardIterator || '';
if (records.Records.length > 0) {
if (records.Records.length > 0 && iterator) {
for (let index = 0; index < records.Records.length; index++) {
const json = JSON.parse(zlib.gunzipSync(Buffer.from(records.Records[index].Data, 'base64')).toString('utf8'));
if (json.messageType === 'DATA_MESSAGE') {
@ -674,6 +674,7 @@ class AWS {
}
}
}
core.info('End of task logs');
});
}
static cleanupResources(CF, taskDef) {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -12,9 +12,9 @@ class AWS {
static async runBuildJob(buildParameters, baseImage) {
try {
const nanoid = customAlphabet(alphabet, 9);
const buildUid = `${nanoid()}-build-${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform
.replace('Standalone', '')
.replace('standalone', '')}`;
.replace('standalone', '')}-${nanoid()}`;
const branchName = process.env.GITHUB_REF?.split('/').reverse()[0];
core.info('Starting part 1/4 (clone from github and restore cache)');
@ -541,7 +541,7 @@ class AWS {
})
.promise();
iterator = records.NextShardIterator || '';
if (records.Records.length > 0) {
if (records.Records.length > 0 && iterator) {
for (let index = 0; index < records.Records.length; index++) {
const json = JSON.parse(
zlib.gunzipSync(Buffer.from(records.Records[index].Data as string, 'base64')).toString('utf8'),
@ -554,6 +554,7 @@ class AWS {
}
}
}
core.info('End of task logs');
}
static async cleanupResources(CF, taskDef) {