@@ -280,32 +280,19 @@ jobs:
280280 echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
281281 chmod 600 ~/.ssh/id_rsa
282282
283- # Download deployment log to check for resize
284- echo "π₯ Downloading deployment log..."
285- scp -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa root@${VPS_IP}:/var/log/setup-dc.log ./upgrade-test.log || echo "Could not download log"
286-
287- # Check if resize was detected and executed
288- if [ -f ./upgrade-test.log ]; then
289- echo "π Checking for droplet resize indicators..."
290- if grep -q "Droplet size mismatch detected" ./upgrade-test.log; then
291- echo "β
PASS: Droplet size mismatch was detected"
292-
293- if grep -q "Droplet resized successfully" ./upgrade-test.log; then
294- echo "β
PASS: Droplet resize completed successfully"
295- else
296- echo "β FAIL: Droplet resize did not complete"
297- echo "π Log excerpt:"
298- grep -A 5 -B 5 "resize" ./upgrade-test.log || echo "No resize info found"
299- exit 1
300- fi
301- else
302- echo "β FAIL: No resize detection found in logs"
303- echo "π Checking deploy.sh log for resize-related messages..."
304- grep -i "resize\|size\|checking if droplet" ./upgrade-test.log | head -20 || echo "No size-related messages found"
305- exit 1
306- fi
283+ # Verify droplet was actually resized via doctl
284+ echo "π Verifying droplet size via doctl..."
285+ doctl auth init --access-token "${{ secrets.DIGITALOCEAN_TOKEN }}"
286+ ACTUAL_SIZE=$(doctl compute droplet get "${{ steps.test-name.outputs.test-name }}" --format Size --no-header)
287+ echo "π Actual droplet size: $ACTUAL_SIZE"
288+
289+ if [ "$ACTUAL_SIZE" = "s-1vcpu-2gb" ]; then
290+ echo "β
PASS: Droplet successfully resized to 2GB"
307291 else
308- echo "β οΈ WARNING: Could not retrieve deployment log"
292+ echo "β FAIL: Droplet is still $ACTUAL_SIZE (expected s-1vcpu-2gb)"
293+ echo "π Droplet info:"
294+ doctl compute droplet get "${{ steps.test-name.outputs.test-name }}" --format Name,Size,Memory,Status
295+ exit 1
309296 fi
310297
311298 # Verify Mautic is still working after upgrade and resize
@@ -327,19 +314,6 @@ jobs:
327314 echo "β FAIL: Container is not running expected version"
328315 exit 1
329316 fi
330-
331- # Verify droplet was actually resized
332- echo "π Verifying droplet size via doctl..."
333- doctl auth init --access-token "${{ secrets.DIGITALOCEAN_TOKEN }}"
334- ACTUAL_SIZE=$(doctl compute droplet get "${{ steps.test-name.outputs.test-name }}" --format Size --no-header)
335- echo "π Actual droplet size: $ACTUAL_SIZE"
336-
337- if [ "$ACTUAL_SIZE" = "s-1vcpu-2gb" ]; then
338- echo "β
PASS: Droplet is now 2GB"
339- else
340- echo "β FAIL: Droplet is still $ACTUAL_SIZE (expected s-1vcpu-2gb)"
341- exit 1
342- fi
343317 else
344318 echo "β FAIL: Mautic is not accessible after upgrade"
345319 exit 1
0 commit comments