Skip to content

Commit

Permalink
DOP-4414 comment out check for main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 19, 2024
1 parent aee5cd4 commit bce69c3
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions api/controllers/v2/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ async function createPayload({
}
action = 'push';
jobType = 'githubPush';
branchName = githubEvent.ref.split('/')[2];
url = githubEvent.repository.clone_url;
branchName = githubEvent.ref?.split('/')[2];
url = githubEvent.repository?.clone_url;
newHead = githubEvent.after;
repoOwner = githubEvent.repository.owner.login;
repoOwner = githubEvent.repository?.owner.login;
}

const branchInfo = await repoBranchesRepository.getRepoBranchAliases(repoName, branchName, repoInfo.project);
Expand Down Expand Up @@ -174,18 +174,18 @@ export const triggerSmokeTestAutomatedBuild = async (event: APIGatewayEvent): Pr
' completed successfully but only Deploy Staging ECS workflow completion will trigger smoke test site deployments',
};

// if the build was not building master, no need for smoke test sites
if (body.workflow_run.head_branch != 'main' || body.repository.fork) {
console.log('Build was not on master branch in main repo, sites will not deploy as no smoke tests are needed');
return {
statusCode: 202,
headers: { 'Content-Type': 'text/plain' },
body:
'Build on branch ' +
body.workflow_run.head_branch +
' will not trigger site deployments as it was not on master branch in upstream repo',
};
}
// // if the build was not building master, no need for smoke test sites
// if (body.workflow_run.head_branch != 'main' || body.repository.fork) {
// console.log('Build was not on master branch in main repo, sites will not deploy as no smoke tests are needed');
// return {
// statusCode: 202,
// headers: { 'Content-Type': 'text/plain' },
// body:
// 'Build on branch ' +
// body.workflow_run.head_branch +
// ' will not trigger site deployments as it was not on master branch in upstream repo',
// };
// }

//automated test builds will always deploy in dotcomstg
const env = 'dotcomstg';
Expand Down

0 comments on commit bce69c3

Please sign in to comment.