From fb5a5511ad6c11e164eb456651fe2d128799fb96 Mon Sep 17 00:00:00 2001 From: Sheetal Date: Tue, 16 Apr 2024 18:19:27 +0530 Subject: [PATCH] pipeline implemetation --- .github/workflows/dev-agent.yml | 7 +++---- .github/workflows/dev-user.yml | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dev-agent.yml b/.github/workflows/dev-agent.yml index 170ee2a11..e588451a1 100644 --- a/.github/workflows/dev-agent.yml +++ b/.github/workflows/dev-agent.yml @@ -71,12 +71,12 @@ jobs: - name: Update Task Definition and service run: | - FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' taskdef/agent-service.json) - NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' taskdef/agent-service.json) + FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' taskdef/user-service.json) + NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' taskdef/user-service.json) SERVICE_NAME="${NAME}-service" # Replace placeholders in the JSON file - sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/agent-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json + sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/user-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json # Debug: Print the content of the modified JSON file cat ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json @@ -101,4 +101,3 @@ jobs: REVISION=$(aws ecs describe-task-definition --task-definition ${FAMILY} --region ap-southeast-1 | jq -r '.taskDefinition.revision') aws ecs update-service --cluster ${CLUSTER} --region ap-southeast-1 --service ${SERVICE_NAME} --task-definition ${FAMILY}:${REVISION} --desired-count ${DESIRED_COUNT} fi - diff --git a/.github/workflows/dev-user.yml b/.github/workflows/dev-user.yml index 2e137823d..56acc5844 100644 --- a/.github/workflows/dev-user.yml +++ b/.github/workflows/dev-user.yml @@ -100,5 +100,4 @@ jobs: # Update the existing service REVISION=$(aws ecs describe-task-definition --task-definition ${FAMILY} --region ap-southeast-1 | jq -r '.taskDefinition.revision') aws ecs update-service --cluster ${CLUSTER} --region ap-southeast-1 --service ${SERVICE_NAME} --task-definition ${FAMILY}:${REVISION} --desired-count ${DESIRED_COUNT} - fi - + fi \ No newline at end of file