diff --git a/.github/workflows/dev-agent-provisioning.yml b/.github/workflows/dev-agent-provisioning.yml index cd53cd8c8..669add199 100644 --- a/.github/workflows/dev-agent-provisioning.yml +++ b/.github/workflows/dev-agent-provisioning.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT_PROVISIONING app to DEV ECS on: push: diff --git a/.github/workflows/dev-agent.yml b/.github/workflows/dev-agent.yml index ee89f292b..028363f67 100644 --- a/.github/workflows/dev-agent.yml +++ b/.github/workflows/dev-agent.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT app to DEV ECS on: push: diff --git a/.github/workflows/dev-api-gateway.yml b/.github/workflows/dev-api-gateway.yml index b8fc3ea8c..3ce7e6c9c 100644 --- a/.github/workflows/dev-api-gateway.yml +++ b/.github/workflows/dev-api-gateway.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy API-GATEWAY app to DEV ECS on: push: diff --git a/.github/workflows/dev-connection.yml b/.github/workflows/dev-connection.yml index ab5fdd480..0b0b6c10a 100644 --- a/.github/workflows/dev-connection.yml +++ b/.github/workflows/dev-connection.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy CONNECTION app to DEV ECS on: push: diff --git a/.github/workflows/dev-ecosystem.yml b/.github/workflows/dev-ecosystem.yml index b4f3d2182..3226d580e 100644 --- a/.github/workflows/dev-ecosystem.yml +++ b/.github/workflows/dev-ecosystem.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ECOSYSTEM app to DEV ECS on: push: diff --git a/.github/workflows/dev-issuance.yml b/.github/workflows/dev-issuance.yml index 886071544..24505bddf 100644 --- a/.github/workflows/dev-issuance.yml +++ b/.github/workflows/dev-issuance.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ISSUANCE app to DEV ECS on: push: diff --git a/.github/workflows/dev-ledger.yml b/.github/workflows/dev-ledger.yml index 14a19a6ec..273880390 100644 --- a/.github/workflows/dev-ledger.yml +++ b/.github/workflows/dev-ledger.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy LEDGER app to DEV ECS on: push: diff --git a/.github/workflows/dev-notification.yml b/.github/workflows/dev-notification.yml index 3bc8346b7..5ebfc278d 100644 --- a/.github/workflows/dev-notification.yml +++ b/.github/workflows/dev-notification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy NOTIFICATION app to DEV ECS on: push: diff --git a/.github/workflows/dev-organization.yml b/.github/workflows/dev-organization.yml index 51b2087e2..b3a167f41 100644 --- a/.github/workflows/dev-organization.yml +++ b/.github/workflows/dev-organization.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ORGANIZATION app to DEV ECS on: push: diff --git a/.github/workflows/dev-user.yml b/.github/workflows/dev-user.yml index b3a4594e3..0ba9af61f 100644 --- a/.github/workflows/dev-user.yml +++ b/.github/workflows/dev-user.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy USER app to DEV ECS on: push: diff --git a/.github/workflows/dev-utility.yml b/.github/workflows/dev-utility.yml index 6c67de48e..8e81cd7da 100644 --- a/.github/workflows/dev-utility.yml +++ b/.github/workflows/dev-utility.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy UTILITY app to DEV ECS on: push: diff --git a/.github/workflows/dev-verification.yml b/.github/workflows/dev-verification.yml index ea5080c5f..814767632 100644 --- a/.github/workflows/dev-verification.yml +++ b/.github/workflows/dev-verification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy VERIFICATION app to DEV ECS on: push: diff --git a/.github/workflows/dev-webhook.yml b/.github/workflows/dev-webhook.yml index e961699f3..3056ed598 100644 --- a/.github/workflows/dev-webhook.yml +++ b/.github/workflows/dev-webhook.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy WEBHOOK app to DEV ECS on: push: diff --git a/.github/workflows/prod-agent-provisioning.yml b/.github/workflows/prod-agent-provisioning.yml index 78a45848f..3c8bdb7ec 100644 --- a/.github/workflows/prod-agent-provisioning.yml +++ b/.github/workflows/prod-agent-provisioning.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT_PROVISIONING app to PROD ECS on: diff --git a/.github/workflows/prod-agent.yml b/.github/workflows/prod-agent.yml index f1d82625c..0b0154a3b 100644 --- a/.github/workflows/prod-agent.yml +++ b/.github/workflows/prod-agent.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT app to PROD ECS on: push: @@ -7,7 +7,7 @@ on: env: - ECR_IMAGE_TAG: "USER_v_${{ github.run_number }}" + ECR_IMAGE_TAG: "AGENT_V_${{ github.run_number }}" ECR_REPOSITORY: "prod-services" AWS_REGION: "ap-southeast-1" CLUSTER: "PROD-NGOTAG-CLUSTER" @@ -40,7 +40,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: prod-services - IMAGE_TAG: "USER_V_${{ github.run_number }}" + IMAGE_TAG: "AGENT_V_${{ github.run_number }}" run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.agent-service . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -50,7 +50,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=prod-services" >> $GITHUB_ENV - echo "IMAGE_TAG=USER_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=AGENT_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | diff --git a/.github/workflows/prod-api-gateway.yml b/.github/workflows/prod-api-gateway.yml index 029d72066..08740b51b 100644 --- a/.github/workflows/prod-api-gateway.yml +++ b/.github/workflows/prod-api-gateway.yml @@ -1,5 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc - +name: Build and deploy API-GATEWAY app to PROD ECS on: push: tags: @@ -7,7 +6,7 @@ on: env: - ECR_IMAGE_TAG: "AGENT_V_${{ github.run_number }}" + ECR_IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" ECR_REPOSITORY: "prod-services" AWS_REGION: "ap-southeast-1" CLUSTER: "PROD-NGOTAG-CLUSTER" @@ -40,7 +39,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: prod-services - IMAGE_TAG: "AGENT_V_${{ github.run_number }}" + IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.api-gateway . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -50,7 +49,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=prod-services" >> $GITHUB_ENV - echo "IMAGE_TAG=AGENT_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=API-GATEWAY_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | diff --git a/.github/workflows/prod-connection.yml b/.github/workflows/prod-connection.yml index 95ae18ae4..a34a51412 100644 --- a/.github/workflows/prod-connection.yml +++ b/.github/workflows/prod-connection.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy CONNECTION app to PROD ECS on: push: diff --git a/.github/workflows/prod-ecosystem.yml b/.github/workflows/prod-ecosystem.yml index 664f4f644..8d8bb8655 100644 --- a/.github/workflows/prod-ecosystem.yml +++ b/.github/workflows/prod-ecosystem.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ECOSYSTEM app to PROD ECS on: push: diff --git a/.github/workflows/prod-issuance.yml b/.github/workflows/prod-issuance.yml index bc086f2e4..5ab6d2bc3 100644 --- a/.github/workflows/prod-issuance.yml +++ b/.github/workflows/prod-issuance.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ISSUANCE app to PROD ECS on: push: diff --git a/.github/workflows/prod-ledger.yml b/.github/workflows/prod-ledger.yml index addd4e3e5..1e8b3e689 100644 --- a/.github/workflows/prod-ledger.yml +++ b/.github/workflows/prod-ledger.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy LEDGER app to PROD ECS on: push: diff --git a/.github/workflows/prod-notification.yml b/.github/workflows/prod-notification.yml index 9a45ea5e6..9d07b0b56 100644 --- a/.github/workflows/prod-notification.yml +++ b/.github/workflows/prod-notification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy NOTIFICATION app to PROD ECS on: push: diff --git a/.github/workflows/prod-organization.yml b/.github/workflows/prod-organization.yml index c7d0fb17f..d417895ad 100644 --- a/.github/workflows/prod-organization.yml +++ b/.github/workflows/prod-organization.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ORGANIZATION app to PROD ECS on: push: diff --git a/.github/workflows/prod-user.yml b/.github/workflows/prod-user.yml index 41d4356c3..6babfc6c1 100644 --- a/.github/workflows/prod-user.yml +++ b/.github/workflows/prod-user.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy USER app to PROD ECS on: push: diff --git a/.github/workflows/prod-utility.yml b/.github/workflows/prod-utility.yml index 6bdb1f08e..2e93ecab3 100644 --- a/.github/workflows/prod-utility.yml +++ b/.github/workflows/prod-utility.yml @@ -1,4 +1,5 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy UTILITY app to PROD ECS + on: push: diff --git a/.github/workflows/prod-verification.yml b/.github/workflows/prod-verification.yml index ca5085191..61b85546a 100644 --- a/.github/workflows/prod-verification.yml +++ b/.github/workflows/prod-verification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy VERIFICATION app to PROD ECS on: push: diff --git a/.github/workflows/prod-webhook.yml b/.github/workflows/prod-webhook.yml index d5d0ebe0c..40ee59029 100644 --- a/.github/workflows/prod-webhook.yml +++ b/.github/workflows/prod-webhook.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy WEBHOOK app to PROD ECS on: push: @@ -7,7 +7,7 @@ on: env: - ECR_IMAGE_TAG: "VERIFICATION_V_${{ github.run_number }}" + ECR_IMAGE_TAG: "WEBHOOK_V_${{ github.run_number }}" ECR_REPOSITORY: "prod-services" AWS_REGION: "ap-southeast-1" CLUSTER: "PROD-NGOTAG-CLUSTER" @@ -40,9 +40,9 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: prod-services - IMAGE_TAG: "VERIFICATION_V_${{ github.run_number }}" + IMAGE_TAG: "WEBHOOK_V_${{ github.run_number }}" run: | - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.verification . + docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.webhook . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG docker image list @@ -50,7 +50,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=prod-services" >> $GITHUB_ENV - echo "IMAGE_TAG=VERIFICATION_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=WEBHOOK_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | @@ -65,16 +65,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\"#" prod-taskdef/verification-service.json + sed -i "s#\"executionRoleArn\": \"arn:aws:iam::.*:role/ecsTaskExecutionRole\"#\"executionRoleArn\": \"arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/ecsTaskExecutionRole\"#" prod-taskdef/webhook-service.json - name: Update Task Definition and service run: | - FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' prod-taskdef/verification-service.json) - NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' prod-taskdef/verification-service.json) - SERVICE_NAME="${NAME}_service" + FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' prod-taskdef/webhook-service.json) + NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' prod-taskdef/webhook-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" prod-taskdef/verification-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" prod-taskdef/webhook-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 diff --git a/.github/workflows/qa-agent-provisioning.yml b/.github/workflows/qa-agent-provisioning.yml index 7d76c4438..8d5b6c81f 100644 --- a/.github/workflows/qa-agent-provisioning.yml +++ b/.github/workflows/qa-agent-provisioning.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT_PROVISIONING app to QA ECS on: push: diff --git a/.github/workflows/qa-agent.yml b/.github/workflows/qa-agent.yml index 79c56df26..492176985 100644 --- a/.github/workflows/qa-agent.yml +++ b/.github/workflows/qa-agent.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT app to QA ECS on: diff --git a/.github/workflows/qa-api-gateway.yml b/.github/workflows/qa-api-gateway.yml index 64958ee8b..7e26f5158 100644 --- a/.github/workflows/qa-api-gateway.yml +++ b/.github/workflows/qa-api-gateway.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy API-GATEWAY app to QA ECS on: push: diff --git a/.github/workflows/qa-connection.yml b/.github/workflows/qa-connection.yml index b3b316dde..5e0bd432a 100644 --- a/.github/workflows/qa-connection.yml +++ b/.github/workflows/qa-connection.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy CONNECTION app to QA ECS on: push: diff --git a/.github/workflows/qa-ecosystem.yml b/.github/workflows/qa-ecosystem.yml index db4edf0db..f9921168e 100644 --- a/.github/workflows/qa-ecosystem.yml +++ b/.github/workflows/qa-ecosystem.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ECOSYSTEM app to QA ECS on: push: diff --git a/.github/workflows/qa-issuance.yml b/.github/workflows/qa-issuance.yml index cbc0ed12d..9581d9f96 100644 --- a/.github/workflows/qa-issuance.yml +++ b/.github/workflows/qa-issuance.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ISSUANCE app to QA ECS on: diff --git a/.github/workflows/qa-ledger.yml b/.github/workflows/qa-ledger.yml index c67a89d75..e09cc88b2 100644 --- a/.github/workflows/qa-ledger.yml +++ b/.github/workflows/qa-ledger.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy LEDGER app to QA ECS on: push: @@ -6,7 +6,7 @@ on: - 'qa-ledger*' env: - ECR_IMAGE_TAG: "ECOSYSTEM_V_${{ github.run_number }}" + ECR_IMAGE_TAG: "LEDGER_V_${{ github.run_number }}" ECR_REPOSITORY: "qa-services" AWS_REGION: "ap-southeast-1" CLUSTER: "QA-NGOTAG-CLUSTER" diff --git a/.github/workflows/qa-notification.yml b/.github/workflows/qa-notification.yml index e5d2298ad..d9a75a491 100644 --- a/.github/workflows/qa-notification.yml +++ b/.github/workflows/qa-notification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy NOTIFICATION app to QA ECS on: push: diff --git a/.github/workflows/qa-organization.yml b/.github/workflows/qa-organization.yml index fd3ebc68f..86b6e6798 100644 --- a/.github/workflows/qa-organization.yml +++ b/.github/workflows/qa-organization.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ORGANIZATION app to QA ECS on: push: diff --git a/.github/workflows/qa-user.yml b/.github/workflows/qa-user.yml index e529d4cf8..3e25239a4 100644 --- a/.github/workflows/qa-user.yml +++ b/.github/workflows/qa-user.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy USER app to QA ECS on: push: @@ -6,7 +6,7 @@ on: - 'qa-user*' env: - ECR_IMAGE_TAG: "USER_v_${{ github.run_number }}" + ECR_IMAGE_TAG: "USER_V_${{ github.run_number }}" ECR_REPOSITORY: "qa-services" AWS_REGION: "ap-southeast-1" CLUSTER: "QA-NGOTAG-CLUSTER" diff --git a/.github/workflows/qa-utility.yml b/.github/workflows/qa-utility.yml index fd6c727b2..07ce6d6a6 100644 --- a/.github/workflows/qa-utility.yml +++ b/.github/workflows/qa-utility.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy UTILITY app to QA ECS on: push: diff --git a/.github/workflows/qa-verification.yml b/.github/workflows/qa-verification.yml index acfc64cfc..415f1a8d6 100644 --- a/.github/workflows/qa-verification.yml +++ b/.github/workflows/qa-verification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy VERIFICATION app to QA ECS on: push: diff --git a/.github/workflows/qa-webhook.yml b/.github/workflows/qa-webhook.yml index 03e52cb63..bb984ec92 100644 --- a/.github/workflows/qa-webhook.yml +++ b/.github/workflows/qa-webhook.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy WEBHOOK app to QA ECS on: push: diff --git a/.github/workflows/stage-agent-provisioning.yml b/.github/workflows/stage-agent-provisioning.yml index 37eeb014d..d0f3b8fc2 100644 --- a/.github/workflows/stage-agent-provisioning.yml +++ b/.github/workflows/stage-agent-provisioning.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT_PROVISIONING app to Stage ECS on: push: diff --git a/.github/workflows/stage-agent.yml b/.github/workflows/stage-agent.yml index df935b5c6..d1371d5fd 100644 --- a/.github/workflows/stage-agent.yml +++ b/.github/workflows/stage-agent.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy AGENT app to Stage ECS on: push: @@ -6,7 +6,7 @@ on: - 'stage-agent-service*' env: - ECR_IMAGE_TAG: "USER_v_${{ github.run_number }}" + ECR_IMAGE_TAG: "AGENT_V_${{ github.run_number }}" ECR_REPOSITORY: "stage-services" AWS_REGION: "ap-southeast-1" CLUSTER: "STAGE-NGOTAG-CLUSTER" @@ -39,7 +39,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: stage-services - IMAGE_TAG: "USER_V_${{ github.run_number }}" + IMAGE_TAG: "AGENT_V_${{ github.run_number }}" run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.agent-service . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -49,7 +49,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=stage-services" >> $GITHUB_ENV - echo "IMAGE_TAG=USER_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=AGENT_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | diff --git a/.github/workflows/stage-api-gateway.yml b/.github/workflows/stage-api-gateway.yml index 300e067f0..c98671b44 100644 --- a/.github/workflows/stage-api-gateway.yml +++ b/.github/workflows/stage-api-gateway.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy API-GATEWAY to Stage ECS on: push: @@ -6,7 +6,7 @@ on: - 'stage-api-gateway*' env: - ECR_IMAGE_TAG: "AGENT_V_${{ github.run_number }}" + ECR_IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" ECR_REPOSITORY: "stage-services" AWS_REGION: "ap-southeast-1" CLUSTER: "STAGE-NGOTAG-CLUSTER" @@ -39,7 +39,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: stage-services - IMAGE_TAG: "AGENT_V_${{ github.run_number }}" + IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.api-gateway . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -49,7 +49,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=stage-services" >> $GITHUB_ENV - echo "IMAGE_TAG=AGENT_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=API-GATEWAY_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | @@ -65,13 +65,13 @@ 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\"#" stage-taskdef/api-gateway-service.json - cat stage-taskdef/api-gateway-service.json + - name: Update Task Definition and service run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/api-gateway-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/api-gateway-service.json) - SERVICE_NAME="${NAME}_service" + SERVICE_NAME="${NAME}-service" echo "SERVICE_NAME: $SERVICE_NAME" # Replace placeholders in the JSON file diff --git a/.github/workflows/stage-connection.yml b/.github/workflows/stage-connection.yml index 4ded9f1d6..33c7d609c 100644 --- a/.github/workflows/stage-connection.yml +++ b/.github/workflows/stage-connection.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy CONNECTION app to Stage ECS on: push: @@ -70,8 +70,9 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/connection-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/connection-service.json) - SERVICE_NAME="${NAME}_service" - + SERVICE_NAME="${NAME}-service" + echo "SERVICE_NAME: $SERVICE_NAME" + # Replace placeholders in the JSON file sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" stage-taskdef/connection-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json @@ -91,6 +92,8 @@ jobs: echo "Entered existing service" # Extract desired count from the stored service info DESIRED_COUNT=$(echo "$SERVICE_INFO" | jq -r '.services[].desiredCount') + echo "DESIRED_COUNT: $DESIRED_COUNT" + if [ "$DESIRED_COUNT" = "0" ]; then DESIRED_COUNT="1" fi diff --git a/.github/workflows/stage-ecosystem.yml b/.github/workflows/stage-ecosystem.yml index 2e6b0cc02..9174bacef 100644 --- a/.github/workflows/stage-ecosystem.yml +++ b/.github/workflows/stage-ecosystem.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ECOSYSTEM app to Stage ECS on: push: diff --git a/.github/workflows/stage-issuance.yml b/.github/workflows/stage-issuance.yml index c9790d3b2..10eb3db60 100644 --- a/.github/workflows/stage-issuance.yml +++ b/.github/workflows/stage-issuance.yml @@ -1,4 +1,5 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ISSUANCE app to Stage ECS + on: diff --git a/.github/workflows/stage-ledger.yml b/.github/workflows/stage-ledger.yml index bb2887f21..29161e451 100644 --- a/.github/workflows/stage-ledger.yml +++ b/.github/workflows/stage-ledger.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy LEDGER app to Stage ECS on: push: @@ -70,7 +70,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/ledger-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/ledger-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/ledger-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json diff --git a/.github/workflows/stage-notification.yml b/.github/workflows/stage-notification.yml index c4cdf5526..87bfb3426 100644 --- a/.github/workflows/stage-notification.yml +++ b/.github/workflows/stage-notification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy NOTIFICATION app to Stage ECS on: push: diff --git a/.github/workflows/stage-organization.yml b/.github/workflows/stage-organization.yml index 11fb3fc46..6b1ce123f 100644 --- a/.github/workflows/stage-organization.yml +++ b/.github/workflows/stage-organization.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy ORGANIZATION app to Stage ECS on: push: @@ -70,7 +70,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/organization-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/organization-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/organization-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json diff --git a/.github/workflows/stage-user.yml b/.github/workflows/stage-user.yml index 193a43e27..9b4d87ca1 100644 --- a/.github/workflows/stage-user.yml +++ b/.github/workflows/stage-user.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy USER app to Stage ECS on: push: diff --git a/.github/workflows/stage-utility.yml b/.github/workflows/stage-utility.yml index 51abd3f8d..6ab68e4ff 100644 --- a/.github/workflows/stage-utility.yml +++ b/.github/workflows/stage-utility.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy UTILITY app to Stage ECS on: push: @@ -70,7 +70,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/utility-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/utility-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/utility-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json diff --git a/.github/workflows/stage-verification.yml b/.github/workflows/stage-verification.yml index 49ed3bb77..fff5ef178 100644 --- a/.github/workflows/stage-verification.yml +++ b/.github/workflows/stage-verification.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy VERIFICATION app to Stage ECS on: push: @@ -70,7 +70,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/verification-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/verification-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/verification-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json diff --git a/.github/workflows/stage-webhook.yml b/.github/workflows/stage-webhook.yml index abb78b6b4..018d4d8cc 100644 --- a/.github/workflows/stage-webhook.yml +++ b/.github/workflows/stage-webhook.yml @@ -1,4 +1,4 @@ -name: Build and deploy Node.js app to ECSsdc +name: Build and deploy WEBHOOK app to Stage ECS on: push: @@ -70,7 +70,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/webhook-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/webhook-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/webhook-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json