Open jordanpadams opened 2 months ago
A sandbox repository has been is being created to test the deployment.
@nutjob4life was able to make a terraform script to be applied and deploy components on a DEV environment. @tloubrieu-jpl will create a meeting with @nutjob4life and @sjoshi-jpl to start to apply that on one repository, e.g. registry-api.
Here is a basic terraform workflow for a DEV tier delivery (assuming the branch is called develop
) that we can adapt:
---
name: 🔧 Development
on:
push:
branches:
- develop
paths-ignore:
- 'CHANGELOG.md'
- 'docs/requirements/**'
workflow_dispatch:
jobs:
development-delivery:
name: 📪 Development Delivery
if: github.actor != 'pdsen-ci'
runs-on: ubuntu-latest
steps:
-
name: 💳 Checkout
uses: actions/checkout@v2
with:
lfs: true
token: ${{secrets.ADMIN_GITHUB_TOKEN}}
fetch-depth: 0
-
name: 🌍 Terraform Setup
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "PUT_VERSION_HERE"
-
name: 🔬 Terraform initialization and validation
run: |
terraform init -no-color
terraform validate -no-color
-
name: 💥 Terraform destruction of any existing delivery
run: terraform apply -destroy -no-color -auto-approve
continue-on-error: true
env:
WHATEVER_SECRET: ${{secrets.WHATEVER}}
-
name: 🛫 Terraform application of new delivery
run: terraform apply -no-color -auto-approve
env:
WHATEVER_SECRET: ${{secrets.WHATEVER}}
...
For more complex projects, simply expand on this, such as cd terraform
for repositories that organize all .tf
files in a single place; or add -var-file
to terraform apply
to give different sets of variables; to providing different environment secrets, etc.
💡 Description
Merge to
develop
branch -> deploy to Dev venue in AWS⚔️ Parent Epic / Related Tickets
No response