Skip to content

Issue #906: Phase A: Stand up LDE microservice (#920) #8

Issue #906: Phase A: Stand up LDE microservice (#920)

Issue #906: Phase A: Stand up LDE microservice (#920) #8

name: Deploy LIF Identity Mapper MariaDB to Amazon ECS
env:
AWS_REGION: us-east-1
GHA_ROLE: "arn:aws:iam::381492161417:role/lif-github-actions-dev"
ECS_CLUSTER: dev
ECS_SERVICE_ORG1: identity-mapper-mariadb-org1-FARGATE
ECS_SERVICE_ORG2: identity-mapper-mariadb-org2-FARGATE
ECS_SERVICE_ORG3: identity-mapper-mariadb-org3-FARGATE
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- .github/workflows/lif_identity_mapper_mariadb.yml
- cloudformation/dev-lif-identity-mapper-mariadb-org1.params
- cloudformation/dev-lif-identity-mapper-mariadb-org2.params
- cloudformation/dev-lif-identity-mapper-mariadb-org3.params
- cloudformation/lif-identity-mapper-mariadb-taskdef-includes.yml
- components/lif/identity_mapper_storage_sql/**
- components/lif/datatypes/**
- components/lif/logging/**
- projects/lif_identity_mapper_mariadb/**
jobs:
lif-identity-mapper-mariadb:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
env:
WORKING_DIR: ./projects/lif_identity_mapper_mariadb
ECR_REPOSITORY: lif/dev/lif_identity_mapper_mariadb
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push docker image
uses: ./.github/actions/build-and-push
with:
working-dir: ${{ env.WORKING_DIR }}
github-actions-role: ${{ env.GHA_ROLE }}
role-session-name: identity-mapper-mariadb-build
aws-region: ${{ env.AWS_REGION }}
ecr-repository: ${{ env.ECR_REPOSITORY }}
- name: Update identity-mapper-mariadb-org1 ECS Service
uses: ./.github/actions/update-cluster
with:
github-actions-role: ${{ env.GHA_ROLE }}
role-session-name: identity-mapper-mariadb-org1-ecs
aws-region: ${{ env.AWS_REGION }}
ecs-cluster: ${{ env.ECS_CLUSTER }}
ecs-service: ${{ env.ECS_SERVICE_ORG1 }}
- name: Update identity-mapper-mariadb-org2 ECS Service
uses: ./.github/actions/update-cluster
with:
github-actions-role: ${{ env.GHA_ROLE }}
role-session-name: identity-mapper-mariadb-org2-ecs
aws-region: ${{ env.AWS_REGION }}
ecs-cluster: ${{ env.ECS_CLUSTER }}
ecs-service: ${{ env.ECS_SERVICE_ORG2 }}
- name: Update identity-mapper-mariadb-org3 ECS Service
uses: ./.github/actions/update-cluster
with:
github-actions-role: ${{ env.GHA_ROLE }}
role-session-name: identity-mapper-mariadb-org3-ecs
aws-region: ${{ env.AWS_REGION }}
ecs-cluster: ${{ env.ECS_CLUSTER }}
ecs-service: ${{ env.ECS_SERVICE_ORG3 }}