Skip to content

Commit

Permalink
DOP-4414 removing newHead and passing in hash through title
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Apr 9, 2024
1 parent 2f42c08 commit 71bbf83
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
async function createAndInsertJob() {
return await Promise.all(
SMOKETEST_SITES.map(async (repoName): Promise<string> => {
const jobTitle = 'Smoke Test ' + repoName;
const jobTitle = `Smoke Test ${repoName} site for commit ${body.workflow_run.head_sha} on docs-worker-pool main branch`;
let repoInfo, projectEntry, repoOwner;
try {
repoInfo = await docsetsRepository.getRepo(repoName);
Expand All @@ -205,7 +205,6 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
prefix: jobPrefix,
repoBranchesRepository,
repoInfo,
newHead: body.workflow_run.head_sha,
repoOwner,
});

Expand Down
2 changes: 1 addition & 1 deletion src/job/jobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export abstract class JobHandler {
if (pathPrefix || pathPrefix === '') {
this.currJob.payload.pathPrefix = pathPrefix;
const mutPrefix = pathPrefix.split(`/${server_user}`)[0];
this.currJob.payload.mutPrefix = mutPrefix + '/slackDeploy';
this.currJob.payload.mutPrefix = mutPrefix;
this._logger.save(
this.currJob._id,
`mutPrefix split ${mutPrefix}, mutPrefix: ${this.currJob.payload.mutPrefix}, prePrefix: ${pathPrefix}, server user: ${server_user}`
Expand Down
4 changes: 3 additions & 1 deletion src/job/productionJobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ export class ProductionJobHandler extends JobHandler {
? `${this.currJob.payload.prefix}/${this.currJob.payload.urlSlug}`
: this.currJob.payload.prefix;
if (this.currJob.payload.newHead && this.currJob.payload.action == 'automatedTest') {
return `smokeTestDeploys/${this.currJob.payload.newHead}/${prefix}`;
const titleArray = this.currJob.title.split(' ');
const commitHash = titleArray[titleArray.length - 5];
return `smokeTestDeploys/${commitHash}/${prefix}`;
}
return prefix;
}
Expand Down

0 comments on commit 71bbf83

Please sign in to comment.