diff --git a/.github/workflows/deploy-prd-ecs.yml b/.github/workflows/deploy-prd-ecs.yml index 68c751c87c..cb7fceb392 100644 --- a/.github/workflows/deploy-prd-ecs.yml +++ b/.github/workflows/deploy-prd-ecs.yml @@ -32,7 +32,6 @@ jobs: npm ci sls deploy --stage prd sls deploy --stage dotcomprd - sls deploy --stage legacydotcomprd - uses: mr-smithers-excellent/docker-build-push@v5 name: build and push to ECR with: diff --git a/.github/workflows/deploy-stg-ecs.yml b/.github/workflows/deploy-stg-ecs.yml index 2967c5812e..2e0cfb462c 100644 --- a/.github/workflows/deploy-stg-ecs.yml +++ b/.github/workflows/deploy-stg-ecs.yml @@ -34,7 +34,6 @@ jobs: npm ci sls deploy --stage stg sls deploy --stage dotcomstg - sls deploy --stage legacydotcomstg - uses: mr-smithers-excellent/docker-build-push@v5 name: build and push to ECR with: @@ -59,30 +58,15 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }} NPM_EMAIL: ${{ secrets.NPM_EMAIL }} - - uses: mr-smithers-excellent/docker-build-push@v5 - name: build and push to ECR Legacy DOTCOM - with: - image: docs-worker-pool-legacydotcomstg - tags: latest - registry: ${{ steps.login-ecr.outputs.registry }} - dockerfile: Dockerfile.legacy - buildArgs: NPM_EMAIL=${{ secrets.NPM_EMAIL }},NPM_BASE_64_AUTH=${{ secrets.NPM_BASE64_AUTH }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - NPM_BASE_64_AUTH: ${{ secrets.NPM_BASE64_AUTH }} - NPM_EMAIL: ${{ secrets.NPM_EMAIL }} - name: Deploy ECS run: | cd infrastructure/ecs-main npm ci sls deploy --stage stg sls deploy --stage dotcomstg - sls deploy --stage legacydotcomstg - name: Deploy Lambdas run: | npm ci sls deploy --stage stg sls deploy --stage dotcomstg - sls deploy --stage legacydotcomstg sls prune -n 5 diff --git a/cdk-infra/utils/env.ts b/cdk-infra/utils/env.ts index 9979090fbb..75fff7560d 100644 --- a/cdk-infra/utils/env.ts +++ b/cdk-infra/utils/env.ts @@ -1,8 +1,8 @@ import { Construct } from 'constructs'; import { getCurrentBranch } from './git'; -const snootyEnvs = ['staging', 'production', 'dotcomstg', 'dotcomprd', 'legacydotcomprd', 'legacydotcomstg'] as const; -const autoBuilderEnvs = ['stg', 'prd', 'dev', 'dotcomstg', 'dotcomprd', 'legacydotcomstg', 'legacydotcomprd'] as const; +const snootyEnvs = ['staging', 'production', 'dotcomstg', 'dotcomprd'] as const; +const autoBuilderEnvs = ['stg', 'prd', 'dev', 'dotcomstg', 'dotcomprd'] as const; const autoBuilderContextVariables = [ 'enhanced', 'isFeatureBranch', @@ -24,8 +24,6 @@ const autoBuilderToSnootyEnvMap: Record = { prd: 'production', dotcomprd: 'dotcomprd', dotcomstg: 'dotcomstg', - legacydotcomstg: 'legacydotcomstg', - legacydotcomprd: 'legacydotcomprd', }; export function envShortToFullName(env: string): SnootyEnv { diff --git a/cdk-infra/utils/search-index.ts b/cdk-infra/utils/search-index.ts index 7096aa55b9..66403f0f0e 100644 --- a/cdk-infra/utils/search-index.ts +++ b/cdk-infra/utils/search-index.ts @@ -6,10 +6,8 @@ export function getSearchIndexFolder(env: AutoBuilderEnv): string { return ''; case 'stg': case 'dotcomstg': - case 'legacydotcomstg': return 'preprd'; case 'dotcomprd': - case 'legacydotcomprd': case 'prd': return 'prd'; } diff --git a/cdk-infra/utils/slack/index.ts b/cdk-infra/utils/slack/index.ts index 27bc5a2ac1..b31ef2871c 100644 --- a/cdk-infra/utils/slack/index.ts +++ b/cdk-infra/utils/slack/index.ts @@ -5,8 +5,6 @@ const dashboardUrls: Record = { prd: `https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=`, dotcomstg: `https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=`, dotcomprd: `https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=`, - legacydotcomstg: `https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=`, - legacydotcomprd: `https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=`, dev: `https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=`, }; diff --git a/cdk-infra/utils/url.ts b/cdk-infra/utils/url.ts index ebfdb7b47e..1ed6cad136 100644 --- a/cdk-infra/utils/url.ts +++ b/cdk-infra/utils/url.ts @@ -4,20 +4,16 @@ const hostUrlMap: Record = { dev: 'docs-dev.mongodb.com', stg: 'mongodbcom-cdn.website.staging.corp.mongodb.com', dotcomstg: 'mongodbcom-cdn.website.staging.corp.mongodb.com', - legacydotcomstg: 'mongodbcom-cdn.website.staging.corp.mongodb.com', prd: 'www.mongodb.com', dotcomprd: 'www.mongodb.com', - legacydotcomprd: 'www.mongodb.com', }; const urlPrefixMap: Record = { dev: 'docs', stg: 'docs-qa', dotcomstg: 'docs-qa', - legacydotcomstg: 'docs-qa', prd: 'docs', dotcomprd: 'docs', - legacydotcomprd: 'docs', }; export const getHostUrl = (env: AutoBuilderEnv): string => hostUrlMap[env]; diff --git a/infrastructure/ecs-main/serverless.yml b/infrastructure/ecs-main/serverless.yml index 603febff76..9d345869df 100644 --- a/infrastructure/ecs-main/serverless.yml +++ b/infrastructure/ecs-main/serverless.yml @@ -65,24 +65,18 @@ custom: prd: '4' dotcomstg: '4' dotcomprd: '4' - legacydotcomstg: '4' - legacydotcomprd: '4' minimumHealthyPercent: dev: 100 stg: 100 prd: 100 dotcomstg: 100 dotcomprd: 100 - legacydotcomstg: 100 - legacydotcomprd: 100 maximumPercent: dev: 200 stg: 200 prd: 200 dotcomstg: 200 dotcomprd: 200 - legacydotcomstg: 200 - legacydotcomprd: 200 deregistrationDelaySecs: '10' targetGroupName: docs-worker-pool accountId: @@ -91,8 +85,6 @@ custom: prd: 216656347858 dotcomstg: 216656347858 dotcomprd: 216656347858 - legacydotcomstg: 216656347858 - legacydotcomprd: 216656347858 dbUsername: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/username} dbPassword: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/password} @@ -152,16 +144,12 @@ custom: prd: https://cdnvalidator.devops.prod.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations dotcomstg: https://cdnvalidator.devops.staging.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations dotcomprd: https://cdnvalidator.devops.prod.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations - legacydotcomstg: https://cdnvalidator.devops.staging.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations - legacydotcomprd: https://cdnvalidator.devops.prod.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations dev: https://cdnvalidator.devops.staging.corp.mongodb.com/api/v1beta1/distributions/${self:custom.distributionName.${self:provider.stage}}/invalidations distributionName: stg: mongodbcom-staging-docs dotcomstg: mongodbcom-staging-docs - legacydotcomstg: mongodbcom-staging-docs dev: mongodbcom-staging-docs dotcomprd: mongodbcom-prod-docs - legacydotcomprd: mongodbcom-prod-docs prd: mongodbcom-prod-docs env: stg: "staging" @@ -169,8 +157,6 @@ custom: dev: "staging" dotcomstg: "dotcomstg" dotcomprd: "dotcomprd" - legacydotcomstg: "dotcomstg" - legacydotcomprd: "dotcomprd" # TODO: When satisfied with manifest generation, remove '-test' searchIndexBucket: docs-search-indexes-test # TODO: In future, use duplicate mapping of dotcomstg -> preprd to have @@ -181,30 +167,22 @@ custom: prd: "prd" dotcomstg: "preprd" dotcomprd: "prd" - legacydotcomstg: "preprd" - legacydotcomprd: "prd" site: host: dev: "docs-dev.mongodb.com" stg: "mongodbcom-cdn.website.staging.corp.mongodb.com" dotcomstg: "mongodbcom-cdn.website.staging.corp.mongodb.com" - legacydotcomstg: "mongodbcom-cdn.website.staging.corp.mongodb.com" prd: "www.mongodb.com" dotcomprd: "www.mongodb.com" - legacydotcomprd: "www.mongodb.com" prefix: dev: "docs" stg: "docs-qa" dotcomstg: "docs-qa" - legacydotcomstg: "docs-qa" prd: "docs" dotcomprd: "docs" - legacydotcomprd: "docs" errorDoc: dotcomstg: "docs-qa/404/index.html" dotcomprd: "docs/404/index.html" - legacydotcomstg: "docs-qa/404/index.html" - legacydotcomprd: "docs/404/index.html" resources: - ${file(./buckets.yml)} diff --git a/serverless.yml b/serverless.yml index 72c4365f0a..66a398034b 100644 --- a/serverless.yml +++ b/serverless.yml @@ -33,15 +33,11 @@ custom: prd: worker-pool-deployment dotcomstg: worker-pool-deployment dotcomprd: worker-pool-deployment - legacydotcomstg: worker-pool-deployment - legacydotcomprd: worker-pool-deployment searchIndexBucket: dev: "" # I'm just here so I don't get fined # TODO: When satisfied with manifest generation, remove the '-test' dotcomstg: docs-search-indexes-test/preprd dotcomprd: docs-search-indexes-test/prd - legacydotcomstg: docs-search-indexes-test/preprd - legacydotcomprd: docs-search-indexes-test/prd fastlyDochubToken: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/dochub/token} fastlyDochubServiceId: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/docs/dochub/service_id} fastlyDochubMap: ${ssm:/env/${self:provider.stage}/docs/worker_pool/fastly/dochub_map} @@ -51,8 +47,6 @@ custom: dev: aws.partner/mongodb.com/stitch.trigger/5e00b7afec293c6507679c4d dotcomstg: aws.partner/mongodb.com/stitch.trigger/5e00b7afec293c6507679c4d dotcomprd: aws.partner/mongodb.com/stitch.trigger/5e00b7afec293c6507679c4d - legacydotcomstg: aws.partner/mongodb.com/stitch.trigger/5e00b7afec293c6507679c4d - legacydotcomprd: aws.partner/mongodb.com/stitch.trigger/5e00b7afec293c6507679c4d dochubEventBus: arn:aws:events:${aws:region}:${aws:accountId}:event-bus/${self:custom.docuhubEventSource.${self:provider.stage}} dbUsername: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/username} dbPassword: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/password} @@ -79,8 +73,6 @@ custom: prd: https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= dotcomstg: https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= dotcomprd: https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= - legacydotcomstg: https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= - legacydotcomprd: https://workerpool-boxgs.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= dev: https://workerpoolstaging-qgeyp.mongodbstitch.com/pages/job.html?collName=${self:custom.jobCollection}&jobId= env: stg: "staging" diff --git a/tests/unit/job/productionJobHandler.test.ts b/tests/unit/job/productionJobHandler.test.ts index 36f334560c..167b95f9f5 100644 --- a/tests/unit/job/productionJobHandler.test.ts +++ b/tests/unit/job/productionJobHandler.test.ts @@ -253,7 +253,7 @@ describe('ProductionJobHandler Tests', () => { }); test('Execute Next Gen Build successfully', async () => { - jobHandlerTestHelper.ess(false, { + jobHandlerTestHelper.setStageForDeploySuccess(false, { status: 'success', output: 'Great work', error: null,