Skip to content

Commit

Permalink
feat: vapt setup
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Aug 15, 2024
1 parent 9a1e59f commit 58836f2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 9 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to staging

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- staging

# NOTE: This is actually using our federated isomer-staging account
jobs:
deploy staging:
name: Deploy app to staging
uses: ./.github/workflows/aws_deploy.yml
# NOTE: deploy in `staging` env to set env specific secrets
environment: staging
with:
aws-region: "ap-southeast-1"
aws-account-id: 058264420411
cicd-role: "arn:aws:iam::058264420411:role/isomer-next-infra-github-oidc-role-aaefdfd"
ecr-repository: "isomer-next-infra-stg-ecr"
ecs-cluster-name: "isomer-next-infra-ecs"
ecs-service-name: "isomer-next-infra-ecs-service"
ecs-container-name: "studio"
ecs-container-port: "3000"
environment: "staging"
shortEnv: "stg"
codedeploy-appspec-path: .aws/deploy/appspec.json
ecs-task-definition-path: ".aws/deploy/task-definition.json"
codedeploy-application-name: "isomer-next-infra-ecs-app"
codedeploy-deployment-group: "isomer-next-infra-ecs-dg"
path-to-dockerfile: "./apps/studio/Dockerfile"

secrets:
DD_API_KEY: ${{ secrets.DD_API_KEY_GITHUB_ACTIONS }}
RDS_READER_ENDPOINT: ${{ secrets.RDS_READER_ENDPOINT }}
19 changes: 10 additions & 9 deletions .github/workflows/deploy_vapt.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to staging
name: Deploy to vapt

concurrency:
group: ${{ github.ref }}
Expand All @@ -15,22 +15,23 @@ jobs:
name: Deploy app to vapt
uses: ./.github/workflows/aws_deploy.yml
# NOTE: deploy in `staging` env to set env specific secrets
environment: staging
# TODO: add this env in github actions
environment: vapt
with:
aws-region: "ap-southeast-1"
aws-account-id: 058264420411
cicd-role: "arn:aws:iam::058264420411:role/isomer-next-infra-github-oidc-role-aaefdfd"
ecr-repository: "isomer-next-infra-stg-ecr"
ecs-cluster-name: "isomer-next-infra-ecs"
ecs-service-name: "isomer-next-infra-ecs-service"
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: "staging"
shortEnv: "stg"
environment: "vapt"
shortEnv: "vapt"
codedeploy-appspec-path: .aws/deploy/appspec.json
ecs-task-definition-path: ".aws/deploy/task-definition.json"
codedeploy-application-name: "isomer-next-infra-ecs-app"
codedeploy-deployment-group: "isomer-next-infra-ecs-dg"
codedeploy-deployment-group: "studio-vapt-ecs-dg"
codedeploy-application-name: "studio-vapt-ecs-app"
path-to-dockerfile: "./apps/studio/Dockerfile"

secrets:
Expand Down

0 comments on commit 58836f2

Please sign in to comment.