v2.5.0-rc2 #135
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Test | |
| env: | |
| IMAGE_TAG: ${{ github.ref_name }} | |
| on: | |
| release: | |
| types: [prereleased] | |
| workflow_dispatch: | |
| inputs: | |
| IMAGE_TAG: | |
| description: Full SHA or tag to promote. Defaults to current commit SHA if 'latest'. | |
| required: false | |
| default: latest | |
| 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: | |
| - name: Sanitize branch names and tags | |
| id: sanitize | |
| run: | | |
| IN_TAG="${{ inputs.IMAGE_TAG || github.event.release.tag_name || github.ref_name }}" | |
| SRC_TAG=$IN_TAG | |
| if [ "${{ github.event_name }}" == "release" ] || [ "$SRC_TAG" == "latest" ] || [ -z "$SRC_TAG" ]; then | |
| SRC_TAG=$(echo ${{ github.sha }} | cut -c1-7) | |
| elif [ ${#SRC_TAG} -ge 40 ]; then | |
| SRC_TAG=$(echo $SRC_TAG | cut -c1-7) | |
| fi | |
| echo "SHORT_SHA=$SRC_TAG" >> $GITHUB_OUTPUT | |
| echo "IMAGE_TAG_SANITIZED=$(echo "$IN_TAG" | sed 's/\//-/g')" >> $GITHUB_OUTPUT | |
| echo "BRANCH_NAME_SANITIZED=$(echo "${{ env.branch-name }}" | sed 's/\//-/g')" >> $GITHUB_OUTPUT | |
| - 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 }}:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.CLIENT_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag server image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.SERVER_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag liquibase image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.LIQUIBASE_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag nginx image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/${{ vars.NGINX_IMAGE }}:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag notifications-api image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notifications-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag notification-push-api image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfone-notification-push-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - name: Tag wfss-pointid-api image | |
| run: | | |
| docker pull ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ steps.sanitize.outputs.SHORT_SHA }} | |
| docker tag ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ steps.sanitize.outputs.SHORT_SHA }} ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| docker push ${{vars.REGISTRY}}/${{github.repository_owner}}/nr-bcws-wfnews-wfss-pointid-api:${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }} | |
| - run: echo "tag-value=${{ steps.sanitize.outputs.IMAGE_TAG_SANITIZED }}" >> $GITHUB_OUTPUT | |
| 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 }} | |
| 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 |