Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/full-deploy-to-pre-prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "PRE PROD Full - Deploy and Version Main to Pre-Prod"
name: "PRE PROD Full - Deploy to Pre-Prod"

on:
workflow_dispatch:
inputs:
branch_or_tag:
description: "Which branch or tag do you want to deploy to pre-prod?"
required: true
type: string
default: main

permissions:
pull-requests: write
Expand All @@ -12,8 +18,7 @@ jobs:
view_action_parameters:
name: View input params
runs-on: ubuntu-latest
steps:

steps:
- name: Display client passed variables
run: |
echo Build Branch: main
Expand Down Expand Up @@ -52,17 +57,19 @@ jobs:
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
runs-on: ubuntu-latest
outputs:
tag: ${{steps.versioning.outputs.tag}}
new_tag: ${{steps.versioning.outputs.new_tag}}
version: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}
permissions: write-all

steps:
- uses: actions/checkout@v4
- name: Checkout main
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
uses: actions/checkout@v4
with:
ref: main
fetch-depth: '0'

- name: Bump version and push tag
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move if to the tag_and_release job

id: versioning
uses: anothrNick/[email protected]
env:
Expand All @@ -72,15 +79,14 @@ jobs:

- name: View outputs
run: |
echo Current tag: ${{steps.versioning.outputs.tag}}
echo New tag: ${{steps.versioning.outputs.new_tag}}
echo Deploying branch or tagged version to pre-prod: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}

publish_all_lambda_layers:
name: Publish all Lambda Layers
needs: ["tag_and_release"]
uses: ./.github/workflows/base-lambda-layer-reusable-publish-all.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
sandbox: pre-prod
environment: pre-prod
python_version: "3.11"
Expand All @@ -92,7 +98,7 @@ jobs:
needs: ["tag_and_release", "publish_all_lambda_layers"]
uses: ./.github/workflows/base-lambdas-reusable-deploy-all.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
sandbox: pre-prod
environment: pre-prod
python_version: "3.11"
Expand All @@ -104,7 +110,7 @@ jobs:
needs: ["tag_and_release"]
uses: ./.github/workflows/base-deploy-ui.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
environment: pre-prod
sandbox: pre-prod
secrets:
Expand All @@ -115,12 +121,9 @@ jobs:
needs: ["tag_and_release"]
uses: ./.github/workflows/base-batch-update.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
environment: pre-prod
sandbox: pre-prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}




26 changes: 15 additions & 11 deletions .github/workflows/lambdas-deploy-to-pre-prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "PRE PROD Lambdas - Deploy and Version Main to Pre-Prod"
name: "PRE PROD Lambdas - Deploy to Pre-Prod"

on:
workflow_dispatch:
inputs:
branch_or_tag:
description: "Which branch or tag do you want to deploy to pre-prod?"
required: true
type: string
default: main

permissions:
pull-requests: write
Expand All @@ -20,20 +26,22 @@ jobs:
runs-on: ubuntu-latest
environment: pre-prod
outputs:
tag: ${{steps.versioning.outputs.tag}}
new_tag: ${{steps.versioning.outputs.new_tag}}
version: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}
defaults:
run:
working-directory: ./lambdas
permissions: write-all

steps:
- uses: actions/checkout@v4
- name: Checkout main
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

uses: actions/checkout@v4
with:
ref: ${{ env.BUILD_BRANCH }}
ref: main
fetch-depth: '0'

- name: Bump version and push tag
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
id: versioning
uses: anothrNick/[email protected]
env:
Expand All @@ -43,20 +51,16 @@ jobs:

- name: View outputs
run: |
echo Current tag: ${{steps.versioning.outputs.tag}}
echo New tag: ${{steps.versioning.outputs.new_tag}}
echo Deploying branch or tagged version to pre-prod lambdas: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}

deploy_all:
name: Deploy all Lambdas
needs: ["run_tests", "tag_and_release"]
uses: ./.github/workflows/lambdas-deploy-feature-to-sandbox.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
sandbox: pre-prod
environment: pre-prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}




26 changes: 16 additions & 10 deletions .github/workflows/ui-deploy-to-pre-prod-manual.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
name: 'PRE PROD UI - Deploy and Version Main to Pre-Prod'
name: 'PRE PROD UI - Deploy to Pre-Prod'

on:
workflow_dispatch:
inputs:
branch_or_tag:
description: "Which branch or tag do you want to deploy to pre-prod?"
required: true
type: string
default: main

permissions:
pull-requests: write
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:

react_testing_job:
name: Run UI Unit Tests
uses: ./.github/workflows/base-jest-test.yml
Expand All @@ -31,20 +36,22 @@ jobs:
build_branch: main

tag_and_release:
needs: ["lambda_test_job", "react_testing_job", "cypress_test_job"]
needs: ["react_testing_job", "cypress_test_job"]
runs-on: ubuntu-latest
outputs:
tag: ${{steps.versioning.outputs.tag}}
new_tag: ${{steps.versioning.outputs.new_tag}}
version: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}
permissions: write-all

steps:
- uses: actions/checkout@v4
- name: Checkout main
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
uses: actions/checkout@v4
with:
ref: main
fetch-depth: '0'

- name: Bump version and push tag
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
id: versioning
uses: anothrNick/[email protected]
env:
Expand All @@ -54,16 +61,15 @@ jobs:

- name: View outputs
run: |
echo Current tag: ${{steps.versioning.outputs.tag}}
echo New tag: ${{steps.versioning.outputs.new_tag}}
echo Deploying branch or tagged version to pre-prod UI: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}

deploy_ui:
name: Deploy UI
needs: ["tag_and_release"]
uses: ./.github/workflows/base-deploy-ui.yml
with:
build_branch: ${{ needs.tag_and_release.outputs.tag }}
build_branch: ${{ needs.tag_and_release.outputs.version }}
environment: pre-prod
sandbox: pre-prod
secrets:
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
Loading