File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,21 +83,27 @@ jobs:
8383 - name : 9. Wait for service stability
8484 run : |
8585 aws ecs wait services-stable \
86- --cluster ${{ secrets.ECS_CLUSTER }} \
87- --services ${{ env.ECS_SERVICE }}
86+ --cluster "$ECS_CLUSTER" \
87+ --services "$ECS_SERVICE"
88+ env :
89+ ECS_CLUSTER : ${{ secrets.ECS_CLUSTER }}
90+ ECS_SERVICE : brain-tumor-service
8891
8992 - name : 10. Get public IP
9093 run : |
91- TASK_ARN=$(aws ecs list-tasks --cluster ${{ secrets. ECS_CLUSTER }} --service-name ${{ env. ECS_SERVICE }} --desired-status RUNNING --query 'taskArns[0]' --output text)
94+ TASK_ARN=$(aws ecs list-tasks --cluster "$ ECS_CLUSTER" --service-name "$ ECS_SERVICE" --desired-status RUNNING --query 'taskArns[0]' --output text)
9295
9396 if [ "$TASK_ARN" == "None" ] || [ -z "$TASK_ARN" ]; then
9497 echo "No running tasks found."
9598 exit 1
9699 fi
97100
98- ENI_ID=$(aws ecs describe-tasks --cluster ${{ secrets. ECS_CLUSTER }} --tasks $TASK_ARN --query 'tasks[0].attachments[0].details[?name==`networkInterfaceId`].value' --output text)
101+ ENI_ID=$(aws ecs describe-tasks --cluster "$ ECS_CLUSTER" --tasks " $TASK_ARN" --query 'tasks[0].attachments[0].details[?name==`networkInterfaceId`].value' --output text)
99102
100- PUBLIC_IP=$(aws ec2 describe-network-interfaces --network-interface-ids $ENI_ID --query 'NetworkInterfaces[0].Association.PublicIp' --output text)
103+ PUBLIC_IP=$(aws ec2 describe-network-interfaces --network-interface-ids " $ENI_ID" --query 'NetworkInterfaces[0].Association.PublicIp' --output text)
101104
102105 echo "Live endpoint: http://$PUBLIC_IP:8000"
103106 echo "Test with: curl http://$PUBLIC_IP:8000/health"
107+ env :
108+ ECS_CLUSTER : ${{ secrets.ECS_CLUSTER }}
109+ ECS_SERVICE : brain-tumor-service
You can’t perform that action at this time.
0 commit comments