@@ -124,13 +124,8 @@ jobs:
124124 --preferences '{"MinHealthyPercentage": 50}'
125125
126126 echo "Deployment initiated for team12-asg-1"
127-
128- - name : Wait for deployment
129- run : |
130- echo "Waiting for instance refresh to complete..."
131- aws autoscaling wait instance-refresh-complete \
132- --auto-scaling-group-name team12-asg-1 \
133- --max-attempts 60
127+ echo "Instance refresh started. Waiting 5 minutes for deployment..."
128+ sleep 300
134129
135130 - name : Health Check
136131 run : |
@@ -181,34 +176,20 @@ jobs:
181176
182177 - name : Deploy Application
183178 run : |
184- cd terraform/environments/prod
185- ASG_NAME=$(terraform output -raw asg_name)
186-
187- # Gradual rollout with 90% healthy instances maintained
179+ # Trigger instance refresh to deploy new version (Production)
188180 aws autoscaling start-instance-refresh \
189- --auto-scaling-group-name $ASG_NAME \
181+ --auto-scaling-group-name team12-asg-1 \
190182 --preferences '{"MinHealthyPercentage": 90, "InstanceWarmup": 300}'
191183
192- echo "Production deployment initiated for $ASG_NAME"
193-
194- - name : Wait for deployment
195- run : |
196- cd terraform/environments/prod
197- ASG_NAME=$(terraform output -raw asg_name)
198-
199- echo "Waiting for instance refresh to complete..."
200- aws autoscaling wait instance-refresh-complete \
201- --auto-scaling-group-name $ASG_NAME \
202- --max-attempts 60
184+ echo "Production deployment initiated for team12-asg-1"
185+ echo "Instance refresh started. Waiting 8 minutes for deployment..."
186+ sleep 480
203187
204188 - name : Health Check
205189 run : |
206- cd terraform/environments/prod
207- ELASTIC_IP=$(terraform output -raw elastic_ip)
208-
209- echo "Running health check on https://$ELASTIC_IP"
190+ echo "Running health check on https://api.bid-market.shop"
210191 for i in {1..30}; do
211- if curl -f -k https://$ELASTIC_IP /actuator/health; then
192+ if curl -f https://api.bid-market.shop /actuator/health; then
212193 echo "Production deployment successful!"
213194 exit 0
214195 fi
0 commit comments