Compare commits
2 commits
f7ab4d5f71
...
273ba0c410
| Author | SHA1 | Date | |
|---|---|---|---|
| 273ba0c410 | |||
| 1bc75fc2f0 |
2 changed files with 19 additions and 0 deletions
3
clevercloud/cron.json
Normal file
3
clevercloud/cron.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
"0 23 * * * $ROOT/clevercloud/rebuild.sh"
|
||||
]
|
||||
16
clevercloud/rebuild.sh
Executable file
16
clevercloud/rebuild.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash -l
|
||||
|
||||
if [[ "$INSTANCE_NUMBER" != "0" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "$REBUILD_API_TOKEN" ]]; then
|
||||
echo "REBUILD_API_TOKEN non défini" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
curl -sf -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}\"}" \
|
||||
|| echo "Rebuild failed" >&2
|
||||
Loading…
Add table
Reference in a new issue