fix: sanitize Portainer API stack response output for improved logging
Some checks failed
Build And Publish Production Image / Build And Publish Production Image (push) Failing after 12s

This commit is contained in:
2026-03-28 02:58:37 -03:00
parent 808c0d0a22
commit e4e2ae3479

View File

@@ -79,8 +79,8 @@ jobs:
echo "GET /api/stacks http code: ${STACKS_HTTP_CODE}" echo "GET /api/stacks http code: ${STACKS_HTTP_CODE}"
echo "GET /api/stacks stderr:" echo "GET /api/stacks stderr:"
cat "${STACKS_ERR}" || true cat "${STACKS_ERR}" || true
echo "GET /api/stacks response body:" echo "GET /api/stacks response (sanitized):"
cat "${STACKS_BODY}" || true jq -r '.[] | "Id=\(.Id) Name=\(.Name) EndpointId=\(.EndpointId)"' "${STACKS_BODY}" || true
if [ "${STACKS_CURL_EXIT}" -ne 0 ]; then if [ "${STACKS_CURL_EXIT}" -ne 0 ]; then
echo "Failed to reach Portainer API while listing stacks." echo "Failed to reach Portainer API while listing stacks."