Fix restricted map controls and release verification
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m17s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 5m17s
This commit is contained in:
@@ -91,19 +91,7 @@ jobs:
|
||||
--connect-timeout 10 --max-time 30 \
|
||||
"$DOKPLOY_URL/api/deployment.all"
|
||||
|
||||
previous_id="$(DOKPLOY_STATUS_FILE="$deployment_file" node <<'NODE'
|
||||
const fs = require("node:fs");
|
||||
let payload;
|
||||
try { payload = JSON.parse(fs.readFileSync(process.env.DOKPLOY_STATUS_FILE, "utf8")); }
|
||||
catch { console.error("Dokploy deployment list was not valid JSON."); process.exit(2); }
|
||||
const rows = Array.isArray(payload)
|
||||
? payload
|
||||
: [payload?.data, payload?.deployments, payload?.items].find(Array.isArray);
|
||||
if (!rows) process.exit(2);
|
||||
const latest = rows[0];
|
||||
process.stdout.write(String(latest?.id ?? latest?.deploymentId ?? ""));
|
||||
NODE
|
||||
)" || {
|
||||
previous_ids="$(node scripts/dokploy-deployment-state.mjs snapshot "$deployment_file")" || {
|
||||
node scripts/dokploy-diagnostics.mjs request "API preflight response parsing" parse-error \
|
||||
"$metrics_file" "$error_file" "$headers_file" "$deployment_file" "$auth_file" >&2
|
||||
echo "Dokploy returned an unexpected deployment list; source was not uploaded." >&2
|
||||
@@ -118,34 +106,25 @@ jobs:
|
||||
echo "Dokploy accepted the source archive; waiting for the VPS build and deployment."
|
||||
|
||||
attempt=0
|
||||
poll_failures=0
|
||||
while [ "$attempt" -lt 360 ]; do
|
||||
dokploy_request "Deployment status GET /api/deployment.all (attempt $((attempt + 1))/360)" "$deployment_file" --get \
|
||||
attempt=$((attempt + 1))
|
||||
if dokploy_request "Deployment status GET /api/deployment.all (attempt $attempt/360)" "$deployment_file" --get \
|
||||
--data-urlencode "applicationId=$DOKPLOY_APPLICATION_ID" \
|
||||
--connect-timeout 10 --max-time 30 \
|
||||
"$DOKPLOY_URL/api/deployment.all"
|
||||
"$DOKPLOY_URL/api/deployment.all"; then
|
||||
poll_failures=0
|
||||
else
|
||||
poll_failures=$((poll_failures + 1))
|
||||
if node scripts/dokploy-deployment-state.mjs retry "$curl_exit" "$http_code" "$poll_failures"; then
|
||||
echo "Transient status lookup failure ($poll_failures/6); the accepted build may still be running. Retrying only the GET."
|
||||
sleep 10
|
||||
continue
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
status="$(DOKPLOY_STATUS_FILE="$deployment_file" DOKPLOY_PREVIOUS_DEPLOYMENT_ID="$previous_id" node <<'NODE'
|
||||
const fs = require("node:fs");
|
||||
let payload;
|
||||
try { payload = JSON.parse(fs.readFileSync(process.env.DOKPLOY_STATUS_FILE, "utf8")); }
|
||||
catch { console.error("Dokploy deployment status was not valid JSON."); process.exit(2); }
|
||||
const rows = Array.isArray(payload)
|
||||
? payload
|
||||
: [payload?.data, payload?.deployments, payload?.items].find(Array.isArray);
|
||||
if (!rows) process.exit(2);
|
||||
const previousId = process.env.DOKPLOY_PREVIOUS_DEPLOYMENT_ID;
|
||||
const current = rows.find((row) => {
|
||||
const id = String(row?.id ?? row?.deploymentId ?? "");
|
||||
return id && id !== previousId;
|
||||
});
|
||||
if (!current) {
|
||||
process.stdout.write("waiting");
|
||||
} else {
|
||||
const value = String(current.status ?? "unknown").toLowerCase();
|
||||
process.stdout.write(["done", "error", "running", "queued", "building", "deploying", "pending", "cancelled", "canceled"].includes(value) ? value : "unknown");
|
||||
}
|
||||
NODE
|
||||
)" || {
|
||||
status="$(DOKPLOY_PREVIOUS_DEPLOYMENT_IDS="$previous_ids" node scripts/dokploy-deployment-state.mjs status "$deployment_file")" || {
|
||||
node scripts/dokploy-diagnostics.mjs request "Deployment status response parsing" parse-error \
|
||||
"$metrics_file" "$error_file" "$headers_file" "$deployment_file" "$auth_file" >&2
|
||||
echo "Dokploy returned an unexpected deployment status; inspect the response diagnostics above." >&2
|
||||
@@ -169,7 +148,6 @@ jobs:
|
||||
esac
|
||||
|
||||
sleep 10
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
|
||||
echo "Timed out waiting for Dokploy to finish; inspect the deployment in Dokploy." >&2
|
||||
|
||||
Reference in New Issue
Block a user