From 1bc75fc2f0e67ba3c4a7c01a43ea5eb7d57537d9 Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Fri, 27 Mar 2026 17:44:29 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20ajoute=20un=20cron=20CleverCloud=20pour?= =?UTF-8?q?=20rebuild=20quotidien=20=C3=A0=20minuit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clevercloud/cron.json | 3 +++ clevercloud/rebuild.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 clevercloud/cron.json create mode 100755 clevercloud/rebuild.sh diff --git a/clevercloud/cron.json b/clevercloud/cron.json new file mode 100644 index 0000000..24bec1b --- /dev/null +++ b/clevercloud/cron.json @@ -0,0 +1,3 @@ +[ + "0 23 * * * $ROOT/clevercloud/rebuild.sh" +] diff --git a/clevercloud/rebuild.sh b/clevercloud/rebuild.sh new file mode 100755 index 0000000..4e2475d --- /dev/null +++ b/clevercloud/rebuild.sh @@ -0,0 +1,10 @@ +#!/bin/bash -l + +if [[ "$INSTANCE_NUMBER" != "0" ]]; then + exit 0 +fi + +curl -X POST \ + "https://api-bridge.clever-cloud.com/v2/organisations/${CC_OWNER_ID}/applications/${APP_ID}/instances" \ + -H "Content-Type: application/json" \ + -d "{\"token\": \"${REBUILD_API_TOKEN}\"}"