Skip to content

Commit

Permalink
Merge branch 'pipeline-implementation' of github.com:Bhutan-NDI/ngota…
Browse files Browse the repository at this point in the history
…g-platform into pipeline-implementation
  • Loading branch information
Sheetal-ayanworks committed Jun 13, 2024
2 parents 0df2d2b + 62c5cf7 commit bb5d6ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/stage-issuance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/issuance-service.json)
NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/issuance-service.json)
SERVICE_NAME="${NAME}_service"
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" stage-taskdef/issuance-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json
Expand All @@ -99,4 +99,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
5 changes: 3 additions & 2 deletions .github/workflows/stage-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/verification-service.json)
SERVICE_NAME="${NAME}-service"
# Replace placeholders in the JSON file
# Replace placeholders in the JSON file
sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" stage-taskdef/verification-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json
# Debug: Print the content of the modified JSON file
Expand All @@ -95,6 +95,7 @@ jobs:
DESIRED_COUNT="1"
fi
# Update the existing service
DESIRED_COUNT="1"
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

0 comments on commit bb5d6ba

Please sign in to comment.