-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6c5c297
Showing
72 changed files
with
2,647 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CD compute permission | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'prod' | ||
- 'preprod' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
cd-event: | ||
if: github.ref_name == 'prod' || github.ref_name == 'preprod' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 20 | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- name: Deploy permission stack | ||
uses: aws-actions/aws-cloudformation-github-deploy@v1 | ||
with: | ||
name: ${{ github.ref_name }}-permission-poja-base | ||
template: cf-stacks/compute-permission-stack.yml | ||
tags: "[ { \"Key\": \"app\", \"Value\": \"poja-base\" }, { \"Key\": \"env\", \"Value\": \"${{ github.ref_name }}\" } ]" | ||
capabilities: CAPABILITY_NAMED_IAM | ||
no-fail-on-empty-changeset: "1" | ||
parameter-overrides: | ||
"Env=${{ github.ref_name }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CD compute | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'prod' | ||
- 'preprod' | ||
|
||
workflow_dispatch: | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
deploy-api: | ||
if: ${{ github.ref_name == 'prod' || github.ref_name == 'preprod' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- run: sam build | ||
|
||
- name: Deploy application | ||
run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --stack-name ${{ github.ref_name }}-compute-poja-base --capabilities CAPABILITY_IAM --parameter-overrides Env=${{ github.ref_name }} --resolve-s3 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: CD event | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'prod' | ||
- 'preprod' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
cd-event: | ||
if: github.ref_name == 'prod' || github.ref_name == 'preprod' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 20 | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- name: Deploy event stack | ||
uses: aws-actions/aws-cloudformation-github-deploy@v1 | ||
with: | ||
name: ${{ github.ref_name }}-event-poja-base | ||
template: cf-stacks/event-stack.yml | ||
tags: "[ { \"Key\": \"app\", \"Value\": \"poja-base\" }, { \"Key\": \"env\", \"Value\": \"${{ github.ref_name }}\" } ]" | ||
capabilities: CAPABILITY_NAMED_IAM | ||
no-fail-on-empty-changeset: "1" | ||
parameter-overrides: | ||
"Env=${{ github.ref_name }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: CD storage bucket | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'prod' | ||
- 'preprod' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
cd-storage: | ||
if: github.ref_name == 'prod' || github.ref_name == 'preprod' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 20 | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- name: Deploy bucket stack | ||
uses: aws-actions/aws-cloudformation-github-deploy@v1 | ||
with: | ||
name: ${{ github.ref_name }}-bucket-poja-base | ||
template: cf-stacks/storage-bucket-stack.yml | ||
tags: "[ { \"Key\": \"app\", \"Value\": \"poja-base\" }, { \"Key\": \"env\", \"Value\": \"${{ github.ref_name }}\" } ]" | ||
capabilities: CAPABILITY_NAMED_IAM | ||
no-fail-on-empty-changeset: "1" | ||
parameter-overrides: | ||
"Env=${{ github.ref_name }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CD storage database | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'prod' | ||
- 'preprod' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
cd-storage: | ||
if: github.ref_name == 'prod' || github.ref_name == 'preprod' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
timeout-minutes: 20 | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- name: Deploy storage database stack | ||
uses: aws-actions/aws-cloudformation-github-deploy@v1 | ||
with: | ||
# TODO: -storage- --> -database-. But it will BREAK backward compatibility. | ||
name: ${{ github.ref_name }}-storage-poja-base | ||
template: cf-stacks/storage-database-stack.yml | ||
tags: "[ { \"Key\": \"app\", \"Value\": \"poja-base\" }, { \"Key\": \"env\", \"Value\": \"${{ github.ref_name }}\" } ]" | ||
capabilities: CAPABILITY_NAMED_IAM | ||
no-fail-on-empty-changeset: "1" | ||
parameter-overrides: | ||
"Env=${{ github.ref_name }}, | ||
ProdDbClusterTimeout=${{ vars.PROD_DB_CLUSTER_TIMEOUT }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
quality-check: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- run: ./gradlew test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Health check email | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
to: | ||
type: string | ||
description: Email address | ||
required: true | ||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
jobs: | ||
check-email: | ||
timeout-minutes: 300 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- run: sh .shell/checkHealth.sh ${{ github.ref_name }} /health/email?to=${{ inputs.to }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Health check infra | ||
on: | ||
schedule: | ||
- cron: '0 8 * * *' | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'prod' | ||
pull_request: | ||
branches: | ||
- 'prod' | ||
|
||
env: | ||
AWS_REGION: eu-west-3 | ||
|
||
jobs: | ||
check-sync-stack: | ||
timeout-minutes: 300 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- run: sh .shell/checkHealth.sh ${{ github.ref_name }} /health/db | ||
|
||
check-async-stack: | ||
timeout-minutes: 300 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- run: sh .shell/checkHealth.sh ${{ github.ref_name }} /health/event | ||
|
||
check-bucket: | ||
timeout-minutes: 300 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: hei-school/[email protected] | ||
with: | ||
secrets: ${{ toJSON(secrets) }} | ||
region: ${{ env.AWS_REGION }} | ||
|
||
- run: sh .shell/checkHealth.sh ${{ github.ref_name }} /health/bucket |
Oops, something went wrong.