Skip to content

Commit

Permalink
DST-17030 Deploy UMT task definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl committed May 29, 2024
1 parent d972516 commit 57aab56
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
contents: read

jobs:
build:
deploy:
runs-on: ubuntu-latest

steps:
Expand All @@ -25,19 +25,16 @@ jobs:
run: yq eval-all 'select(fileIndex == 0) *d select(fileIndex == 1)' deploy/values.yml deploy/values-dev.yml > deploy/merged.yml

- name: Update task definition
env:
VERSION: ${{ inputs.version }}
ENVIRONMENT_NAME: ${{ steps.env.outputs.delius-name }}
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install gomplate
old_task_definition=$(aws ecs describe-task-definition --task-definition "$family" --include TAGS | jq '.taskDefinition | del(.containerDefinitions[0].command, .compatibilities, .taskDefinitionArn, .requiresAttributes, .revision, .status, .registeredAt, .registeredBy)')
old_task_definition=$(aws ecs describe-task-definition --task-definition "$TASK_DEFINITION" --include TAGS | jq '.taskDefinition | del(.containerDefinitions[0].command, .compatibilities, .taskDefinitionArn, .requiresAttributes, .revision, .status, .registeredAt, .registeredBy)')
new_task_definition=$(gomplate --file deploy/task-definition.yml --context values=deploy/merged.yml)
merged_task_definition_json=$(yq eval-all 'select(fileIndex == 0) *d select(fileIndex == 1)' <(echo "${old_task_definition}") <(echo "${new_task_definition}") --output-format json | tee task-definition.json)
echo "Deploying new task definition: ${merged_task_definition_json}"
env:
VERSION: dev
family: umt
TASK_DEFINITION: umt

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@69e7aed9b8acdd75a6c585ac669c33831ab1b9a3 # v1.5.0
Expand Down

0 comments on commit 57aab56

Please sign in to comment.