Skip to content

Commit

Permalink
Add tasks to update lambda based on images (#2293)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai authored Jan 11, 2024
1 parent 7409ff1 commit a74f86d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/merge_to_main_production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
env:
PRIVATE_ECR: ${{ secrets.PRODUCTION_AWS_ACCOUNT }}.dkr.ecr.ca-central-1.amazonaws.com/notify
API_LAMBDA_IMAGE: api-lambda:a4e4b54
HEARTBEAT_LAMBDA_IMAGE: heartbeat:fb6dcdfda3c8e21ef997e75d1cb872bb08916cf3
SYSTEM_STATUS_LAMBDA_IMAGE: system_status:fb6dcdfda3c8e21ef997e75d1cb872bb08916cf3
KUBECTL_VERSION: 1.23.6

defaults:
Expand Down Expand Up @@ -90,6 +92,20 @@ jobs:
function-name: api-lambda
image-uri: $PRIVATE_ECR/$API_LAMBDA_IMAGE

- name: Deploy Heartbeat lambda
uses: ./.github/actions/update-lambda-function
with:
alias-name: latest
function-name: heartbeat
image-uri: $PRIVATE_ECR/$HEARTBEAT_LAMBDA_IMAGE

- name: Deploy System Status lambda
uses: ./.github/actions/update-lambda-function
with:
alias-name: latest
function-name: system_status
image-uri: $PRIVATE_ECR/$SYSTEM_STATUS_LAMBDA_IMAGE

- name: Add deployment to New Relic
run: |
for application_id in 283469061 283468826 283468685; do
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/merge_to_main_staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ jobs:
alias-name: latest
function-name: api-lambda

- name: Force heartbeat lambda to redeploy on environment changes
if: env.ENV_DIFF != '0'
uses: ./.github/actions/update-lambda-function
with:
alias-name: latest
function-name: heartbeat

- name: Force system_status to redeploy on environment changes
if: env.ENV_DIFF != '0'
uses: ./.github/actions/update-lambda-function
with:
alias-name: latest
function-name: system_status

- name: Bump version and push tag
id: bump_and_push_tag
uses: mathieudutour/github-tag-action@bcb832838e1612ff92089d914bccc0fd39458223 # v4.6
Expand Down

0 comments on commit a74f86d

Please sign in to comment.