-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1605 from ChildMindInstitute/release/1.6.0
Release/1.6.0
- Loading branch information
Showing
45 changed files
with
2,424 additions
and
2,297 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
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
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 |
---|---|---|
@@ -1,5 +1,12 @@ | ||
name: Deploy to Dev | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
IMAGE_NAME: | ||
required: true | ||
type: string | ||
description: Image tag | ||
|
||
workflow_call: | ||
inputs: | ||
IMAGE_NAME: | ||
|
@@ -17,58 +24,59 @@ env: | |
IMAGE_NAME: ${{ inputs.IMAGE_NAME }} | ||
|
||
jobs: | ||
run_migration: | ||
name: Run Database Migrations | ||
runs-on: ubuntu-latest | ||
env: | ||
TASK_DEFINITION: migration | ||
ECS_SERVICE_NAME: migration | ||
|
||
steps: | ||
- name: echo IMAGE_NAME | ||
run: | | ||
echo $IMAGE_NAME | ||
- name: configure aws credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
role-to-assume: arn:aws:iam::017925157769:role/cmiml-dev-oidc-github-role | ||
role-session-name: OIDC-GHA-session | ||
aws-region: ${{ env.AWS_REGION }} | ||
|
||
- name: Download task definition | ||
run: | | ||
aws ecs describe-task-definition --task-definition ${{ env.TASK_DEFINITION }} --query taskDefinition > task-definition.json | ||
- name: Render Amazon ECS task definition | ||
id: task-def | ||
uses: aws-actions/amazon-ecs-render-task-definition@v1 | ||
with: | ||
task-definition: task-definition.json | ||
container-name: mind_logger | ||
image: ${{ inputs.IMAGE_NAME }} | ||
|
||
- name: Update Task Definition | ||
uses: aws-actions/amazon-ecs-deploy-task-definition@v1 | ||
with: | ||
task-definition: ${{ steps.task-def.outputs.task-definition }} | ||
|
||
- name: Run migration container | ||
id: run-task | ||
uses: geekcell/[email protected] | ||
with: | ||
cluster: ${{ env.ECS_CLUSTER_NAME }} | ||
task-definition: ${{ env.TASK_DEFINITION }} | ||
subnet-ids: subnet-02b7cfd48947b31ef | ||
security-group-ids: sg-0976f7b2b2b5bf411 | ||
override-container-command: | | ||
/bin/sh | ||
-c | ||
/fastapi-migrate all | ||
# run_migration: | ||
# environment: dev | ||
# name: Run Database Migrations | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# TASK_DEFINITION: migration | ||
# ECS_SERVICE_NAME: migration | ||
# | ||
# steps: | ||
# - name: echo IMAGE_NAME | ||
# run: | | ||
# echo $IMAGE_NAME | ||
# | ||
# - name: configure aws credentials | ||
# uses: aws-actions/configure-aws-credentials@v3 | ||
# with: | ||
# role-to-assume: arn:aws:iam::017925157769:role/cmiml-dev-oidc-github-role | ||
# role-session-name: OIDC-GHA-session | ||
# aws-region: ${{ env.AWS_REGION }} | ||
# | ||
# - name: Download task definition | ||
# run: | | ||
# aws ecs describe-task-definition --task-definition ${{ env.TASK_DEFINITION }} --query taskDefinition > task-definition.json | ||
# | ||
# - name: Render Amazon ECS task definition | ||
# id: task-def | ||
# uses: aws-actions/amazon-ecs-render-task-definition@v1 | ||
# with: | ||
# task-definition: task-definition.json | ||
# container-name: mind_logger | ||
# image: ${{ inputs.IMAGE_NAME }} | ||
# | ||
# - name: Update Task Definition | ||
# uses: aws-actions/amazon-ecs-deploy-task-definition@v1 | ||
# with: | ||
# task-definition: ${{ steps.task-def.outputs.task-definition }} | ||
# | ||
# - name: Run migration container | ||
# id: run-task | ||
# uses: geekcell/github-action-aws-ecs-run-task@v4 | ||
# with: | ||
# cluster: ${{ env.ECS_CLUSTER_NAME }} | ||
# task-definition: ${{ env.TASK_DEFINITION }} | ||
# subnet-ids: subnet-02b7cfd48947b31ef | ||
# security-group-ids: sg-0976f7b2b2b5bf411 | ||
# override-container-command: | | ||
# /bin/sh | ||
# -c | ||
# /fastapi-migrate all | ||
|
||
deploy_to_ecs: | ||
runs-on: ubuntu-latest | ||
needs: run_migration | ||
# needs: run_migration | ||
|
||
name: Deploy ${{ matrix.apps.name }} | ||
strategy: | ||
|
@@ -127,7 +135,7 @@ jobs: | |
|
||
on-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ always() && (needs.deploy_to_ecs.result == 'failure' || needs.deploy_to_ecs.result == 'timed_out') }} | ||
if: ${{ !cancelled() && (needs.deploy_to_ecs.result == 'failure' || needs.deploy_to_ecs.result == 'timed_out') }} | ||
needs: | ||
- deploy_to_ecs | ||
steps: | ||
|
@@ -144,7 +152,7 @@ jobs: | |
|
||
on-success: | ||
runs-on: ubuntu-latest | ||
if: ${{ always() && (needs.deploy_to_ecs.result == 'success') }} | ||
if: ${{ !cancelled() && (needs.deploy_to_ecs.result == 'success') }} | ||
needs: | ||
- deploy_to_ecs | ||
steps: | ||
|
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
# VSCode | ||
.vscode/ | ||
|
||
allure-results/ | ||
|
||
|
||
## Python stuff | ||
|
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
Oops, something went wrong.