NASA-PDS / devops

Parent repo for PDS DevOps activities
Apache License 2.0
0 stars 0 forks source link

Design Continuous Deployment for React apps to AWS venues #74

Open jordanpadams opened 5 months ago

jordanpadams commented 5 months ago

💡 Description

Architect how / when we want to deploy to Dev, Test, and Production venues.

⚔️ Parent Epic / Related Tickets

No response

nutjob4life commented 3 months ago

We have a working sandbox repository → AWS thanks to Terraform and the hashicorp/setup-terraform action. It is probably sufficient to re-use that and just let either separate triggers (or separate var files with separate workflows) to handle the differences between dev, test, and production venues.

We can talk about this at breakout meeting on 2024-06-13 if necessary. The idea is:

dev-delivery.yaml

on:
    push:
        branches:
            - 'develop'
…
    -
        name: Terraform application
        run: terraform apply -no-color -auto-approve -var-file=dev.tfvars

stage-delivery.yaml

on:
    push:
        branches:
            - 'stage'
…
    -
        name: Terraform application
        run: terraform apply -no-color -auto-approve -var-file=stage.tfvars

prod-delivery.yaml

on:
    push:
        branches:
            - 'stage'
…
    -
        name: Terraform application
        run: terraform apply -no-color -auto-approve -var-file=prod.tfvars

Of course, secrets can be passed with GitHub secrets and env vars.