Skip to content

PROD Full - Deploy tagged version to Prod #1

PROD Full - Deploy tagged version to Prod

PROD Full - Deploy tagged version to Prod #1

name: "PROD Full - Deploy tagged version to Prod"
on:
workflow_dispatch:
inputs:
tag_version:
description: "What tagged verison do you want to push to prod?"
required: true
type: "string"
permissions:
pull-requests: write
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
PYTHON_VERSION: "3.11"
ENVIRONMENT: prod
SANDBOX: prod
BUILD_BRANCH: ${{ inputs.tag_version }}
jobs:
view_action_parameters:
name: View input params
runs-on: ubuntu-latest
steps:
- name: Display client passed variables
run: |
echo Build Branch: ${{ inputs.tag_version }}
echo Sandbox: prod
echo Environment: prod
echo Cypress Base Url: ${{ vars.CYPRESS_BASE_URL }}
lambda_test_job:
name: Run Lambda Unit Tests
uses: ./.github/workflows/base-lambdas-reusable-test.yml
with:
python_version: "3.11"
build_branch: ${{ inputs.tag_version }}
react_testing_job:
name: Run UI Unit Tests
uses: ./.github/workflows/base-jest-test.yml
with:
build_branch: ${{ inputs.tag_version }}
cypress_build_job:
name: Build UI version for E2E Tests
uses: ./.github/workflows/base-cypress-build.yml
with:
build_branch: ${{ inputs.tag_version }}
cypress_test_job:
name: Run Cypress E2E Tests
needs: [cypress_build_job]
uses: ./.github/workflows/base-cypress-test-all-env.yml
with:
cypress_base_url: ${{ vars.CYPRESS_BASE_URL }}
build_branch: ${{ inputs.tag_version }}
deploy_all_lambdas:
name: Deploy all Lambdas
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
uses: ./.github/workflows/base-lambdas-reusable-deploy-all.yml
with:
build_branch: ${{ inputs.tag_version }}
sandbox: prod
environment: prod
python_version: "3.11"
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
deploy_ui:
name: Deploy UI
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
uses: ./.github/workflows/base-deploy-ui.yml
with:
build_branch: ${{ inputs.tag_version }}
environment: prod
sandbox: prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}