Skip to content

Commit

Permalink
DOP-4401-b adding initial changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Mar 26, 2024
1 parent a164201 commit c4f34c1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-stg-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
branches:
- "main"
- "integration"
- "DOP-4414"
concurrency:
group: environment-stg-${{ github.ref }}
cancel-in-progress: true
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-stg-enhanced-webhooks.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
on:
push:
# paths: ["api/v2/**", "cdk-infra/lib/constructs/api/**", "cdk-infra/utils/**"]
paths: ["api/v2/**", "cdk-infra/lib/constructs/api/**", "cdk-infra/utils/**"]
branches:
- "main"
- "integration"
- "DOP-4414"

concurrency:
group: environment-stg-enhanced-webhooks-${{ github.ref }}
Expand Down
33 changes: 23 additions & 10 deletions src/job/productionJobHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,34 @@ export class ProductionJobHandler extends JobHandler {

getPathPrefix(): string {
try {
if (this.currJob.payload.prefix && this.currJob.payload.prefix === '') {
return this.currJob.payload.urlSlug ?? '';
const prefix = this.currJob.payload.urlSlug
? `${this.currJob.payload.urlSlug}/${this.currJob.payload.prefix}`
: this.currJob.payload.prefix;
if (this.currJob.payload.newHead && this.currJob.payload.action == 'automatedTest') {
return `${prefix}/${this.currJob.payload.newHead}`;
}
if (this.currJob.payload.urlSlug) {
if (this.currJob.payload.urlSlug === '') {
return this.currJob.payload.prefix;
} else {
return `${this.currJob.payload.prefix}/${this.currJob.payload.urlSlug}`;
}
}
return this.currJob.payload.prefix;
return prefix;
} catch (error) {
this.logger.save(this.currJob._id, error).then();
throw new InvalidJobError(error.message);
}
// try {
// if (this.currJob.payload.prefix && this.currJob.payload.prefix === '') {
// return this.currJob.payload.urlSlug ?? '';
// }
// if (this.currJob.payload.urlSlug) {
// if (this.currJob.payload.urlSlug === '') {
// return this.currJob.payload.prefix;
// } else {
// return this.currJob.payload.prefix + `/${this.currJob.payload.urlSlug}`;
// }
// }

// return prefix;
// } catch (error) {
// this.logger.save(this.currJob._id, error).then();
// throw new InvalidJobError(error.message);
// }
}

private async purgePublishedContent(makefileOutput: Array<string>): Promise<void> {
Expand Down

0 comments on commit c4f34c1

Please sign in to comment.