Skip to content

Commit

Permalink
seed cicd implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheetal-ayanworks committed Sep 12, 2024
1 parent b2ad13e commit a1c4fa7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/qa-seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ jobs:
- name: Replace executionRoleArn in task definition
run: |
sed -i "s#\"executionRoleArn\": \"arn:aws:iam::.*:role/ecsTaskExecutionRole\"#\"executionRoleArn\": \"arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ecsTaskExecutionRole\"#" qa-taskdef/ledger-service.json
sed -i "s#\"executionRoleArn\": \"arn:aws:iam::.*:role/ecsTaskExecutionRole\"#\"executionRoleArn\": \"arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ecsTaskExecutionRole\"#" qa-taskdef/seed.json
- name: Update Task Definition and service
run: |
FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' qa-taskdef/ledger-service.json)
NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' qa-taskdef/ledger-service.json)
SERVICE_NAME="${NAME}-service"
FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' qa-taskdef/seed.json)
NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' qa-taskdef/seed.json)
SERVICE_NAME="${NAME}"
# Replace placeholders in the JSON file
sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" qa-taskdef/ledger-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" qa-taskdef/seed.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
Expand Down

0 comments on commit a1c4fa7

Please sign in to comment.