From 9e36e45927e93760ad6559fa33c7d78e49031ae6 Mon Sep 17 00:00:00 2001 From: Matt Meigs Date: Wed, 29 Nov 2023 10:31:27 -0500 Subject: [PATCH] uncomment prepNextGenBuild --- src/commands/src/shared/next-gen-deploy.ts | 11 +---------- src/entrypoints/localApp.ts | 14 +++++--------- src/job/jobHandler.ts | 4 ++-- src/job/stagingJobHandler.ts | 2 -- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/commands/src/shared/next-gen-deploy.ts b/src/commands/src/shared/next-gen-deploy.ts index c1ce1eb6c..dbe54fa3a 100644 --- a/src/commands/src/shared/next-gen-deploy.ts +++ b/src/commands/src/shared/next-gen-deploy.ts @@ -1,22 +1,13 @@ import { executeAndPipeCommands, executeCliCommand } from '../helpers'; interface NextGenDeployParams { - // bucket: string; mutPrefix: string; gitBranch: string; hasConfigRedirects: boolean; - // url: string; preppedLogger: (message: string) => void; } -export async function nextGenDeploy({ - // bucket, - mutPrefix, - gitBranch, - hasConfigRedirects, - // url, - preppedLogger, -}: NextGenDeployParams) { +export async function nextGenDeploy({ mutPrefix, gitBranch, hasConfigRedirects, preppedLogger }: NextGenDeployParams) { try { if (hasConfigRedirects && (gitBranch === 'main' || gitBranch === 'master')) { // equivalent to: mut-redirects config/redirects -o public/.htaccess diff --git a/src/entrypoints/localApp.ts b/src/entrypoints/localApp.ts index ecbe9b2cf..e3416089a 100644 --- a/src/entrypoints/localApp.ts +++ b/src/entrypoints/localApp.ts @@ -53,7 +53,7 @@ const fakeJob: Job = { }; const preppedLogger = (message: string) => { - console.log('hey'); + console.log(message); }; async function localApp() { @@ -111,25 +111,21 @@ async function localApp() { console.log(oasPageBuildRes); console.log('Begin next-gen-stage...'); - // const { resultMessage, commands } = await nextGenStage({ - // job: fakeJob, - // preppedLogger, - // }); - // console.log(resultMessage); + await nextGenStage({ + job: fakeJob, + preppedLogger, + }); console.log('next-gen-stage complete'); console.log('Begin next-gen-deploy...'); const deployRes = await nextGenDeploy({ - // bucket, hasConfigRedirects: hasRedirects, gitBranch: commitBranch, mutPrefix: mutPrefix || '', - // url: baseUrl, preppedLogger, }); console.log(deployRes); console.log('next-gen-deploy complete'); - // console.log('commands: ', commands); console.log('bundle Path: ', bundlePath); } diff --git a/src/job/jobHandler.ts b/src/job/jobHandler.ts index 2f9cf19dc..f303305ac 100644 --- a/src/job/jobHandler.ts +++ b/src/job/jobHandler.ts @@ -534,8 +534,8 @@ export abstract class JobHandler { this._logger.save(this._currJob._id, 'Pulled Repo'); // this.prepBuildCommands(); // this._logger.save(this._currJob._id, 'Prepared Build commands'); - // await this.prepNextGenBuild(); - // this._logger.save(this._currJob._id, 'Prepared Next Gen build'); + await this.prepNextGenBuild(); + this._logger.save(this._currJob._id, 'Prepared Next Gen build'); await this._repoConnector.applyPatch(this.currJob); this._logger.save(this._currJob._id, 'Patch Applied'); // await this.downloadMakeFile(); diff --git a/src/job/stagingJobHandler.ts b/src/job/stagingJobHandler.ts index 1679a227d..bd8711608 100644 --- a/src/job/stagingJobHandler.ts +++ b/src/job/stagingJobHandler.ts @@ -97,12 +97,10 @@ export class StagingJobHandler extends JobHandler { }); this.logger.save(this.currJob._id, `Now to deploy `); await nextGenDeploy({ - // bucket: 'docs-atlas-dotcomstg', gitBranch: this.currJob.payload.branchName, mutPrefix: this.currJob.mutPrefix || '', hasConfigRedirects: hasConfigRedirects, preppedLogger: (message: string) => this.logger.save(this.currJob._id, message), - // url: 'https://mongodbcom-cdn.website.staging.corp.mongodb.com', }); // resp = await this.deployGeneric(); }