From f11e4b5ea6546d99669d1ce029fcb72d7860d159 Mon Sep 17 00:00:00 2001 From: Matt Meigs Date: Tue, 28 Nov 2023 13:45:01 -0500 Subject: [PATCH] remove steps that should not be used --- src/job/jobHandler.ts | 53 ++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/job/jobHandler.ts b/src/job/jobHandler.ts index c39981739..242f038c8 100644 --- a/src/job/jobHandler.ts +++ b/src/job/jobHandler.ts @@ -328,6 +328,7 @@ export abstract class JobHandler { // call prerequisite commands await this._commandExecutor.execute(prerequisiteCommands); + await this._logger.save(this.currJob._id, `${'DONE with prereqs!!'.padEnd(15)}`); // create constants for command inputs const thisLogger = this._logger; @@ -354,32 +355,32 @@ export abstract class JobHandler { await nextGenHtml(preppedLogger); this._logger.save(this._currJob._id, 'NextGenHtml Finished'); - for (const command of makeCommands) { - // works for any make command with the following signature make - const key = command.split(' ')[1].trim(); - this._logger.save(this.currJob._id, `command: ${command}`); - if (commandMap[key]) { - this._logger.save(this.currJob._id, `running from commandMap: ${key}`); - await commandMap[key]({ job: this.currJob, preppedLogger }); - } else if (key === 'next-gen-html') { - this._logger.save(this.currJob._id, `running nextGenHtml!`); - await nextGenHtml(preppedLogger); - } else { - if (stages[key]) { - const makeCommandsWithBenchmarksResponse = await this.callWithBenchmark(command, stages[key]); - await this.logBuildDetails(makeCommandsWithBenchmarksResponse); - } else { - const makeCommandsResp = await this._commandExecutor.execute([command]); - await this.logBuildDetails(makeCommandsResp); - } - } - - // Call Gatsby Cloud preview webhook after persistence module finishes for staging builds - const isFeaturePreviewWebhookEnabled = process.env.GATSBY_CLOUD_PREVIEW_WEBHOOK_ENABLED?.toLowerCase() === 'true'; - if (key === 'persistence-module' && this.name === 'Staging' && isFeaturePreviewWebhookEnabled) { - await this.callGatsbyCloudWebhook(); - } - } + // for (const command of makeCommands) { + // // works for any make command with the following signature make + // const key = command.split(' ')[1].trim(); + // this._logger.save(this.currJob._id, `command: ${command}`); + // if (commandMap[key]) { + // this._logger.save(this.currJob._id, `running from commandMap: ${key}`); + // await commandMap[key]({ job: this.currJob, preppedLogger }); + // } else if (key === 'next-gen-html') { + // this._logger.save(this.currJob._id, `running nextGenHtml!`); + // await nextGenHtml(preppedLogger); + // } else { + // if (stages[key]) { + // const makeCommandsWithBenchmarksResponse = await this.callWithBenchmark(command, stages[key]); + // await this.logBuildDetails(makeCommandsWithBenchmarksResponse); + // } else { + // const makeCommandsResp = await this._commandExecutor.execute([command]); + // await this.logBuildDetails(makeCommandsResp); + // } + // } + + // // Call Gatsby Cloud preview webhook after persistence module finishes for staging builds + // const isFeaturePreviewWebhookEnabled = process.env.GATSBY_CLOUD_PREVIEW_WEBHOOK_ENABLED?.toLowerCase() === 'true'; + // if (key === 'persistence-module' && this.name === 'Staging' && isFeaturePreviewWebhookEnabled) { + // await this.callGatsbyCloudWebhook(); + // } + // } await this._logger.save(this.currJob._id, `${'(BUILD)'.padEnd(15)}Finished Build`); }