cleanup
parent
cca4e12d15
commit
c0b94d75b6
|
|
@ -220,12 +220,14 @@ const nanoid_1 = __webpack_require__(39140);
|
|||
const fs = __importStar(__webpack_require__(35747));
|
||||
const core = __importStar(__webpack_require__(42186));
|
||||
const zlib = __importStar(__webpack_require__(78761));
|
||||
const alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
class AWS {
|
||||
static runBuildJob(buildParameters, baseImage) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${nanoid_1.nanoid()}`;
|
||||
const nanoid = nanoid_1.customAlphabet(alphabet, 9);
|
||||
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${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'], [
|
||||
|
|
@ -450,9 +452,7 @@ class AWS {
|
|||
}
|
||||
static setupCloudFormations(CF, buildUid, stackName, image, entrypoint, commands, mountdir, workingdir, secrets, platform) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const imageStackName = image.replace(/[^\da-z]/gi, '');
|
||||
const buildUidStackName = buildUid.replace(/[^\da-z]/gi, '');
|
||||
const taskDefStackName = `${stackName}-${platform}-${buildUidStackName}-build`;
|
||||
const taskDefStackName = `${stackName}-${platform}-${buildUid}-build`;
|
||||
const taskDefCloudFormation = fs.readFileSync(`${__dirname}/task-def-formation.yml`, 'utf8');
|
||||
yield CF.createStack({
|
||||
StackName: taskDefStackName,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,13 +1,14 @@
|
|||
import * as SDK from 'aws-sdk';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
import * as fs from 'fs';
|
||||
import * as core from '@actions/core';
|
||||
import * as zlib from 'zlib';
|
||||
import { BuildParameters } from '.';
|
||||
const alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||
|
||||
class AWS {
|
||||
static async runBuildJob(buildParameters, baseImage) {
|
||||
try {
|
||||
const nanoid = customAlphabet(alphabet, 9);
|
||||
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${nanoid()}`;
|
||||
const branchName = process.env.GITHUB_REF?.split('/').reverse()[0];
|
||||
|
||||
|
|
@ -313,9 +314,7 @@ class AWS {
|
|||
secrets,
|
||||
platform,
|
||||
) {
|
||||
const imageStackName = image.replace(/[^\da-z]/gi, '');
|
||||
const buildUidStackName = buildUid.replace(/[^\da-z]/gi, '');
|
||||
const taskDefStackName = `${stackName}-${platform}-${buildUidStackName}-build`;
|
||||
const taskDefStackName = `${stackName}-${platform}-${buildUid}-build`;
|
||||
const taskDefCloudFormation = fs.readFileSync(`${__dirname}/task-def-formation.yml`, 'utf8');
|
||||
await CF.createStack({
|
||||
StackName: taskDefStackName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue