2026-03-27 17:44:29 +01:00
|
|
|
#!/bin/bash -l
|
|
|
|
|
|
|
|
|
|
if [[ "$INSTANCE_NUMBER" != "0" ]]; then
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
|
|
2026-03-27 17:56:23 +01:00
|
|
|
if [[ -z "$REBUILD_API_TOKEN" ]]; then
|
|
|
|
|
echo "REBUILD_API_TOKEN non défini" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
curl -sf -X POST \
|
2026-03-27 17:44:29 +01:00
|
|
|
"https://api-bridge.clever-cloud.com/v2/organisations/${CC_OWNER_ID}/applications/${APP_ID}/instances" \
|
2026-04-13 23:14:45 +02:00
|
|
|
-H "Authorization: Bearer ${REBUILD_API_TOKEN}" \
|
2026-03-27 17:56:23 +01:00
|
|
|
|| echo "Rebuild failed" >&2
|