Skip to content

Commit

Permalink
Update qa-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkircos authored Jan 15, 2025
1 parent d5de708 commit abdca96
Showing 1 changed file with 9 additions and 115 deletions.
124 changes: 9 additions & 115 deletions .github/workflows/qa-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ concurrency:

jobs:
infra:
needs:
- files_preview
- multiplayer_preview
- connection_preview
needs: [build_preview_images]
name: Create or Update Pulumi Infrastructure Stack
runs-on: blacksmith-2vcpu-ubuntu-2204
if: github.head_ref == 'qa' && github.base_ref == 'main'
Expand Down Expand Up @@ -67,10 +64,13 @@ jobs:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PR_ID: ${{ github.event.pull_request.number }}

multiplayer_preview:
name: Build Multiplayer
build_preview_images:
name: Build ${{ matrix.service }}
runs-on: blacksmith-4vcpu-ubuntu-2204
if: github.head_ref == 'qa' && github.base_ref == 'main'
strategy:
matrix:
service: [multiplayer, files, connection]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -91,114 +91,8 @@ jobs:
- name: Build, Tag, and Push Image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: quadratic-multiplayer-development
IMAGE_TAG: pr-${{ github.event.pull_request.number }}
ECR_REPOSITORY: quadratic-${{ matrix.service }}-development
IMAGE_TAG: pr-qa
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f quadratic-multiplayer/Dockerfile .
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f quadratic-${{ matrix.service }}/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
files_preview:
name: Build Files
runs-on: blacksmith-4vcpu-ubuntu-2204
if: github.head_ref == 'qa' && github.base_ref == 'main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEVELOPMENT }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEVELOPMENT }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, Tag, and Push Image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: quadratic-files-development
IMAGE_TAG: pr-${{ github.event.pull_request.number }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f quadratic-files/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
connection_preview:
name: Build Connection
runs-on: blacksmith-4vcpu-ubuntu-2204
if: github.head_ref == 'qa' && github.base_ref == 'main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_DEVELOPMENT }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_DEVELOPMENT }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, Tag, and Push Image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: quadratic-connection-development
IMAGE_TAG: pr-${{ github.event.pull_request.number }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f quadratic-connection/Dockerfile .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
# client_preview:
# needs: infra
# runs-on: blacksmith-4vcpu-ubuntu-2204
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 18

# - name: Set up Rust
# uses: moonrepo/setup-rust@v1
# with:
# cache: false
# - uses: jetli/wasm-pack-action@v0.4.0
# with:
# version: 'latest'

# - name: Build Client
# working-directory: quadratic-client
# run: |
# npm ci
# npm run build:wasm:javascript
# npm run build:wasm:types
# npm run build
# env:
# VITE_ENVIRONMENT: preview
# VITE_QUADRATIC_API_URL: https://quadratic-api-dev-pr-${{ github.event.pull_request.number }}.herokuapp.com
# VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
# VITE_AUTH0_CLIENT_ID: ${{ secrets.VITE_AUTH0_CLIENT_ID }}
# VITE_AUTH0_AUDIENCE: ${{ secrets.VITE_AUTH0_AUDIENCE }}
# VITE_AUTH0_ISSUER: ${{ secrets.VITE_AUTH0_ISSUER }}
# VITE_AUTH0_DOMAIN: ${{ secrets.VITE_AUTH0_DOMAIN }}

# # Set up AWS credentials
# - name: Set up AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws-region: your-aws-region

# # Deploy to S3
# - name: Deploy to S3
# run: |
# aws s3 sync ./path-to-your-static-files/ s3://your-s3-bucket-name --delete

0 comments on commit abdca96

Please sign in to comment.