Merge pull request #2182 from Budibase/feature/watchtower-hooks

Add watchtower hooks
This commit is contained in:
Rory Powell 2021-07-30 11:25:38 +01:00 committed by GitHub
commit 1dec11e76c
12 changed files with 20 additions and 0 deletions

View File

@ -7,3 +7,4 @@ public/
db/dev.db/
dist
coverage/
watchtower-hook.json

View File

@ -1,5 +1,10 @@
FROM node:12-alpine
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="scripts/watchtower-hooks/post-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="scripts/watchtower-hooks/post-check.sh"
WORKDIR /app
ENV PORT=4001

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "post-check" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "post-update" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-check" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-update" }' > 'watchtower-hook.json'

View File

@ -1,2 +1,3 @@
node_modules/
.env
watchtower-hook.json

View File

@ -1,5 +1,10 @@
FROM node:12-alpine
LABEL com.centurylinklabs.watchtower.lifecycle.pre-check="scripts/watchtower-hooks/pre-check.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.pre-update="scripts/watchtower-hooks/pre-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-update="scripts/watchtower-hooks/post-update.sh"
LABEL com.centurylinklabs.watchtower.lifecycle.post-check="scripts/watchtower-hooks/post-check.sh"
WORKDIR /app
# copy files and install dependencies

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "post-check" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "post-update" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-check" }' > 'watchtower-hook.json'

View File

@ -0,0 +1 @@
echo '{ "current-hook" : "pre-update" }' > 'watchtower-hook.json'