Skip to content

Commit

Permalink
DOP-4414 testing jobupdates queue
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 18, 2024
1 parent 25f19b8 commit 50a685a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
//add docs_metadata to config
const projectsRepository = new ProjectsRepository(client.db('docs_metadata'), c, consoleLogger);
const repoBranchesRepository = new RepoBranchesRepository(db, c, consoleLogger);
const docsetsRepository = new DocsetsRepository(db, c, consoleLogger);

if (!event.body) {
const err = 'Trigger build does not have a body in event payload';
Expand Down Expand Up @@ -196,8 +197,6 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
const repoName = SMOKETEST_SITES[s];
const jobTitle = 'Smoke Test ' + repoName;
let repoInfo, projectEntry, repoOwner;
const docsetsRepository = new DocsetsRepository(db, c, consoleLogger);
// if (repoName == 'docs') return docsetsRepository.getRepo(repoName);

try {
repoInfo = await docsetsRepository.getRepo(repoName);
Expand All @@ -215,7 +214,8 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
}

const jobPrefix = repoInfo?.prefix ? repoInfo['prefix'][env] : '';
//add commit hash to jobPrefix here?

//add commit hash here
//const newHead = body.workflow_run.head_sha;

const payload = await createPayload(repoName, true, jobPrefix, repoBranchesRepository, repoInfo, '', repoOwner);
Expand Down
1 change: 1 addition & 0 deletions cdk-infra/lib/constructs/api/webhook-api-construct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export class WebhookApiConstruct extends Construct {

// grant permission for lambdas to enqueue messages to the job updates queue
jobUpdatesQueue.grantSendMessages(slackTriggerLambda);
jobUpdatesQueue.grantSendMessages(githubSmokeTestBuildLambda);
jobUpdatesQueue.grantSendMessages(githubTriggerLambda);
jobUpdatesQueue.grantSendMessages(triggerLocalBuildLambda);

Expand Down
1 change: 0 additions & 1 deletion src/repositories/docsetsRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export class DocsetsRepository extends BaseRepository {
directory ? `with directory: /${directory}` : ''
}`;
this._logger.info(this._repoName, msg);
return this._repoName;
}
return res?.[0];
}
Expand Down

0 comments on commit 50a685a

Please sign in to comment.