Skip to content

Adding staging deployment #15

Adding staging deployment

Adding staging deployment #15

Workflow file for this run

name: Deploy ingestor
on:
push:
branches:
- staging/aeolus
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY_PROD }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Get envionmental values
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
STAGING, openaq-env/staging
name-transformation: uppercase
parse-json-secrets: true
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install CDK
run: |
npm install -g aws-cdk
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Deploy stack
env:
ENV: "staging"
PROJECT: "openaq"
## deployment variables
# CDK_ACCOUNT: ${{ secrets.CDK_ACCOUNT }}
# CDK_REGION: ${{ secrets.CDK_REGION }}
VPC_ID: ${{ env.STAGING_VPC_ID }}
TOPIC_ARN: ${{ env.STAGING_FETCH_OBJECT_TOPIC_ARN }}
## application variables
DATABASE_READ_USER: ${{ env.STAGING_DATABASE_READ_USER }}
DATABASE_READ_PASSWORD: ${{ env.STAGING_DATABASE_READ_PASSWORD }}
DATABASE_WRITE_USER: ${{ env.STAGING_DATABASE_WRITE_USER }}
DATABASE_WRITE_PASSWORD: ${{ env.STAGING_DATABASE_WRITE_PASSWORD }}
DATABASE_DB: ${{ env.STAGING_DATABASE_DB }}
DATABASE_HOST: ${{ env.STAGING_DATABASE_HOST }}
DATABASE_PORT: ${{ env.STAGING_DATABASE_PORT }}
FETCH_BUCKET: ${{ env.STAGING_FETCH_BUCKET }}
ETL_BUCKET: ${{ env.STAGING_FETCH_BUCKET }}
PAUSE_INGESTING: True
working-directory: ./cdk
run: |
poetry self add poetry-plugin-export
poetry install
cdk deploy openaq-ingest-staging --require-approval never