Skip to content
20 changes: 10 additions & 10 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Continuous deployment
run-name: Continuous deployment of ${{ github.ref }} to "copilotmigration"
run-name: Continuous deployment of ${{ github.ref_name }} to QA and Test

on:
push:
Expand All @@ -11,13 +11,13 @@ jobs:
build-and-push-image:
needs: test
uses: ./.github/workflows/build-and-push-image.yml
deploy-infrastructure:
needs: test
uses: ./.github/workflows/deploy-infrastructure.yml
with:
environment: copilotmigration
deploy-application:
needs: [build-and-push-image, deploy-infrastructure]
uses: ./.github/workflows/deploy-application.yml
deploy-mavis:
needs: build-and-push-image
strategy:
fail-fast: false
matrix:
environment: ["qa", "test"]
uses: ./.github/workflows/deploy-mavis.yml
with:
environment: copilotmigration
environment: ${{ matrix.environment }}
image_tag: ${{ github.sha }}
11 changes: 7 additions & 4 deletions .github/workflows/deploy-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ on:
environment:
required: true
type: string
image_tag:
required: false
type: string

env:
aws-role: ${{ inputs.environment == 'production'
Expand Down Expand Up @@ -77,7 +80,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tfplan_app
name: tfplan_app-${{ inputs.environment }}
path: ${{ runner.temp }}/tfplan

apply-changes:
Expand All @@ -98,7 +101,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: tfplan_app
name: tfplan_app-${{ inputs.environment }}
path: ${{ runner.temp }}
- name: Install terraform
uses: hashicorp/setup-terraform@v3
Expand All @@ -116,7 +119,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: CODEDEPLOY_ENV
name: CODEDEPLOY_ENV-${{ inputs.environment }}
path: ${{ runner.temp }}/CODEDEPLOY_ENV

create-deployment:
Expand All @@ -130,7 +133,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: CODEDEPLOY_ENV
name: CODEDEPLOY_ENV-${{ inputs.environment }}
path: ${{ runner.temp }}/artifact
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tfplan_infrastructure
name: tfplan_infrastructure-${{ inputs.environment }}
path: ${{ runner.temp }}/tfplan

apply:
Expand All @@ -104,7 +104,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: tfplan_infrastructure
name: tfplan_infrastructure-${{ inputs.environment }}
path: ${{ runner.temp }}
- name: Install terraform
uses: hashicorp/setup-terraform@v3
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/deploy-mavis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy Mavis on Environment
run-name: Deploying Mavis on ${{ inputs.environment }}

on:
workflow_call:
inputs:
environment:
required: true
type: string
image_tag:
description: Docker image tag of the image to deploy
required: true
type: string
workflow_dispatch:
inputs:
environment:
description: Deployment environment
required: true
type: choice
options:
- qa
- poc
- test
- preview
- training
- production
- copilotmigration
image_tag:
description: Docker image tag of the image to deploy
required: true
type: string

jobs:
deploy-infrastructure:
uses: ./.github/workflows/deploy-infrastructure.yml
with:
environment: ${{ inputs.environment }}
deploy-application:
needs: deploy-infrastructure
uses: ./.github/workflows/deploy-application.yml
with:
environment: ${{ inputs.environment }}
image_tag: ${{ inputs.image_tag }}
Loading