From d5fcf96ea5a3590970fa3d328310aa25abe67687 Mon Sep 17 00:00:00 2001 From: seaerchin Date: Tue, 26 Nov 2024 13:59:41 +0800 Subject: [PATCH] chore: update workflows --- .github/workflows/deploy_vapt.yml | 47 ------------------------------- apps/studio/package.json | 6 ++-- apps/studio/src/env.mjs | 1 + 3 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/deploy_vapt.yml diff --git a/.github/workflows/deploy_vapt.yml b/.github/workflows/deploy_vapt.yml deleted file mode 100644 index c7389e23b7..0000000000 --- a/.github/workflows/deploy_vapt.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Deploy to vapt - -concurrency: - group: ${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - vapt - -# NOTE: This is actually using our federated isomer-staging account -jobs: - deploy_staging: - name: Deploy app to vapt - uses: ./.github/workflows/aws_deploy.yml - # NOTE: deploy in `staging` env to set env specific secrets - with: - aws-region: "ap-southeast-1" - aws-account-id: "058264420411" - cicd-role: "arn:aws:iam::058264420411:role/isomer-next-infra-github-oidc-role-b58f3de" - ecr-repository: "isomer-next-infra-vapt-ecr" - ecs-cluster-name: "studio-vapt-ecs" - ecs-service-name: "studio-vapt-ecs-service" - ecs-container-name: "studio" - ecs-container-port: 3000 - environment: "vapt" - shortEnv: "vapt" - codedeploy-appspec-path: .aws/deploy/appspec.json - ecs-task-definition-path: .aws/deploy/task-definition.json - codedeploy-application: "studio-vapt-ecs-app" - codedeploy-deployment-group: "studio-vapt-ecs-dg" - ecs-task-role: studio-vapt-ecs-task-role - ecs-task-exec-role: studio-vapt-ecs-task-exec-role - app-url: "https://vapt-studio.isomer.gov.sg" - app-name: "Isomer Studio (VAPT)" - app-version: ${{ github.sha }} - app-enable-sgid: false - app-s3-region: "ap-southeast-1" - app-s3-assets-bucket-name: "isomer-next-infra-vapt-assets-private-ab628e1" - app-s3-assets-domain-name: "isomer-user-content-vapt.by.gov.sg" - app-growthbook-client-key: "sdk-x4jkIJGr4TizR8qK" - app-intercom-app-id: "jv2tjc3g" - - secrets: - DD_API_KEY: ${{ secrets.DD_API_KEY_GITHUB_ACTIONS }} - RDS_READER_ENDPOINT: ${{ secrets.RDS_READER_ENDPOINT }} diff --git a/apps/studio/package.json b/apps/studio/package.json index d29be5bfd1..000cbe35bc 100644 --- a/apps/studio/package.json +++ b/apps/studio/package.json @@ -39,11 +39,11 @@ "storybook": "storybook dev -p 6007", "build-storybook": "storybook build", "clean": "git clean -xdf .next .turbo node_modules build", - "jump:vapt": "source .ssh/.env.vapt && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/studio-vapt-bastion.pem", - "migrate:vapt": "source .ssh/.env.vapt && npx prisma migrate deploy", "jump": "source .ssh/.env.prod && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/studio-prod-bastion.pem", "jump:staging": "source .ssh/.env.staging && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/studio-staging-bastion.pem", - "migrate:staging": "source .ssh/.env.staging && npx prisma migrate deploy" + "jump:uat": "source .ssh/.env.uat && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/studio-uat-bastion.pem", + "migrate:staging": "source .ssh/.env.staging && npx prisma migrate deploy", + "migrate:uat": "source .ssh/.env.uat && npx prisma migrate deploy" }, "prisma": { "seed": "tsx prisma/seed.ts" diff --git a/apps/studio/src/env.mjs b/apps/studio/src/env.mjs index b53e8f942b..ff9ad9637c 100644 --- a/apps/studio/src/env.mjs +++ b/apps/studio/src/env.mjs @@ -28,6 +28,7 @@ const client = z "production", "vapt", "test", + "uat", ]), NEXT_PUBLIC_ENABLE_SGID: coerceBoolean.default("false"), NEXT_PUBLIC_APP_URL: z.string().url().optional(),