Skip to content

v2.3.9-rc.0

v2.3.9-rc.0 #116

Workflow file for this run

name: Deploy Test
env:
IMAGE_TAG: ${{ inputs.IS_HOTFIX == 'true' && format('hotfix-{0}-{1}', vars.PATCH_BRANCH, vars.HOTFIX_TAG) || github.ref_name }}
on:
release:
types: [prereleased]
workflow_dispatch:
inputs:
IS_HOTFIX:
description: 'Is this a hotfix?'
required: false
default: 'false'
jobs:
call-lambda-zip:
uses: ./.github/workflows/lambda-zip.yml
secrets: inherit
with:
ENVIRONMENT: TEST
REGISTRY: ${{ vars.REGISTRY }}
tag-images:
runs-on: ubuntu-22.04
environment: TEST
env:
branch-name: ${{ github.event_name == 'release' && github.event.release.target_commitish || github.ref_name }}
outputs:
tag-value: ${{ steps.get-release-tag.outputs.tag-value }}
steps:
- uses: actions/checkout@v3
if: ${{ inputs.IS_HOTFIX != 'true' }}
- uses: actions/checkout@v3
if: ${{ inputs.IS_HOTFIX == 'true' }}
with:
ref: ${{ inputs.BRANCH }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ vars.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Tag client image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ env.IMAGE_TAG }}
- name: Tag server image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ env.IMAGE_TAG }}
- name: Tag liquibase image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ env.IMAGE_TAG }}
- name: Tag nginx image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ env.IMAGE_TAG }}
- name: Tag notifications-api image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ env.IMAGE_TAG }}
- name: Tag notification-push-api image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ env.IMAGE_TAG }}
- name: Tag wfss-pointid-api image
run: |
docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ env.branch-name }}
docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ env.branch-name }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ env.IMAGE_TAG }}
docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ env.IMAGE_TAG }}
- run: echo ::set-output name=tag-value::${{ env.IMAGE_TAG }}
id: get-release-tag
terragrunt-deploy-test:
needs: [tag-images, call-lambda-zip]
uses: ./.github/workflows/terragrunt-deploy.yml
with:
DEFAULT_APPLICATION_ENVIRONMENT: TEST
IMAGE_TAG: ${{ needs.tag-images.outputs.tag-value }}
IS_HOTFIX: ${{ inputs.IS_HOTFIX }}
TARGET_ENV: test
MAX_RECEIVED_COUNT: 10
VISIBILITY_TIMEOUT_SECONDS: 100
PUSH_NOTIFICATION_AWS_USER: ""
EVENT_BRIDGE_ARN: ""
WFNEWS_URL: ""
BAN_PROHIBITION_MONITOR_KEY: ""
ACTIVE_FIRE_MONITOR_KEY: ""
AREA_RESTRICTIONS_MONITOR_KEY: ""
EVACUATION_MONITOR_KEY: ""
LAMBDA_LAYER_KEY: ""
secrets: inherit
ios-deploy:
uses: ./.github/workflows/ios.yml
needs: [tag-images]
with:
build_environment: TEST
upload_to_app_store: true
skip_slack_notification: false
secrets: inherit
android-deploy:
uses: ./.github/workflows/android.yml
needs: [tag-images]
with:
build_environment: TEST
upload_to_play_store: true
increment_version_number: true
skip_slack_notification: false
secrets: inherit