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
28 changes: 22 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
version: 61.${{ github.run_number }}.${{ github.run_attempt }}
java_version: 21
java_distribution: "corretto"

build-docker:
name: Build Docker
uses: ./.github/workflows/build-docker.yml
Expand All @@ -27,7 +28,8 @@ jobs:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
docker_hub_username: ${{ secrets.DOCKER_HUB_USERNAME }}
docker_hub_password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
needs: [build-maven]
needs: [ build-maven ]

cdk-diff-stage:
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')
name: CDK diff to Stage
Expand All @@ -36,7 +38,8 @@ jobs:
environment: "stage"
secrets:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
needs: [ build-maven ]
needs: [ build-maven, build-docker ]

cdk-deploy-stage:
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')
name: CDK deploy to Stage
Expand All @@ -45,14 +48,26 @@ jobs:
environment: "stage"
secrets:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
needs: [cdk-diff-stage, build-docker]
needs: [ cdk-diff-stage ]

eks-deploy-stage:
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix/')
name: EKS deploy to Stage
uses: ./.github/workflows/eks-deploy.yml
with:
environment: "stage"
needs: [cdk-diff-stage, build-docker, cdk-deploy-stage]
needs: [ cdk-deploy-stage ]

cdk-diff-prod:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/')
name: CDK diff to Prod
uses: ./.github/workflows/cdk-diff.yml
with:
environment: "prod"
secrets:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
needs: [ build-maven, build-docker ]

cdk-deploy-prod:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/')
name: CDK deploy to Prod
Expand All @@ -61,7 +76,8 @@ jobs:
environment: "prod"
secrets:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
needs: [cdk-diff-stage, build-docker]
needs: [ cdk-diff-prod ]

eks-deploy-prod:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/hotfix/')
name: EKS deploy to Prod
Expand All @@ -70,4 +86,4 @@ jobs:
environment: "prod"
secrets:
aws_assume_role: ${{ secrets.AWS_ASSUME_ROLE }}
needs: [cdk-deploy-prod]
needs: [ cdk-deploy-prod ]
1 change: 1 addition & 0 deletions .github/workflows/cdk-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest
container: # Replace with GitHub action in the future
image: public.ecr.aws/truemark/aws-cdk:ubuntu
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v4

Expand Down