Skip to content

Commit

Permalink
testing deployment
Browse files Browse the repository at this point in the history
added condition for tags
  • Loading branch information
yatrashkevich-scn committed May 28, 2024
1 parent c04f3a8 commit a97e3b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/run_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ jobs:
deploy_to_uat:
needs: run_codebuild_project
uses: ChildMindInstitute/mindlogger-backend-refactor/.github/workflows/run_deploy_uat.yaml@develop
if: contains(github.ref, '-rc')
with:
COMMIT_HASH: ${{ github.sha }}
IMAGE_PREFIX: ${{ github.ref_name }}

deploy_to_test:
needs: run_codebuild_project
uses: ChildMindInstitute/mindlogger-backend-refactor/.github/workflows/run_deploy_test.yaml@develop
if: contains(github.ref, '-rc')
with:
COMMIT_HASH: ${{ github.sha }}
IMAGE_PREFIX: ${{ github.ref_name }}
1 change: 0 additions & 1 deletion .github/workflows/run_deploy_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
- name: change image and register task definitions
run: |
NEW_IMAGE=${IMAGE_PREFIX/\//-}-$(echo $COMMIT_HASH | cut -c1-5)
for app in api worker scheduler; do
export NEW_TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition ${TASK_FAMILY_PREFIX}_${app} --region ${AWS_REGION} | jq --arg IMAGE "$ECR_REPO:$NEW_IMAGE" '.taskDefinition | .containerDefinitions[0].image = $IMAGE | del(.taskDefinitionArn) | del(.revision) | del(.status) | del(.requiresAttributes) | del(.compatibilities) | del(.registeredAt) | del(.registeredBy)')
aws ecs register-task-definition --region ${AWS_REGION} --cli-input-json "$NEW_TASK_DEFINITION"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_deploy_test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: deploy_to_test
on:
push:
tags:
- '**'
workflow_call:
inputs:
COMMIT_HASH:
Expand All @@ -17,6 +20,7 @@ jobs:

deploy_to_ecs:
runs-on: ubuntu-latest
if: contains(github.ref, '-rc')
env:
TASK_FAMILY: backend_api
ECS_CLUSTER_NAME: cmiml-test
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_deploy_uat.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: deploy_to_uat
on:
push:
tags:
- '**'
workflow_call:
inputs:
COMMIT_HASH:
Expand All @@ -17,6 +20,7 @@ jobs:

deploy_to_ecs:
runs-on: ubuntu-latest
if: contains(github.ref, '-rc')
env:
TASK_FAMILY: backend_api
ECS_CLUSTER_NAME: cmiml-uat
Expand Down

0 comments on commit a97e3b5

Please sign in to comment.