cleanup stage

This commit is contained in:
Andreas Neue 2023-10-16 09:30:19 +02:00
parent 21c5d0c58e
commit cb856b1396
2 changed files with 10 additions and 2 deletions

View File

@ -11,12 +11,12 @@ endif
include make-deploy/$(DEPLOY_TYPE).mk
.PHONY: self-update mandatory prerequisites prepare build test deploy pre-deploy post-deploy pre-local post-local upload pull start stop restart reload
.PHONY: self-update mandatory cleanup prerequisites prepare build test deploy pre-deploy post-deploy pre-local post-local upload pull start stop restart reload
self-update:
@- git submodule update --remote
deploy: mandatory prepare build test upload pre-deploy pre-local pull start post-local post-deploy reload
deploy: mandatory cleanup prepare build test upload pre-deploy pre-local pull start post-local post-deploy reload
mandatory:
@- echo "\n### mandatory check"
@ -34,6 +34,12 @@ prerequisites:
@- echo "\n### prerequisites ..."
@- ./prerequisites.sh
cleanup:
@- echo "\n### cleanup ..."
@- $(foreach host,$(DEPLOY_HOSTS), \
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh cleanup.sh $(host)"; \
)
prepare:
@- echo "\n### preparing ..."
@- chmod 600 secrets.mk

View File

@ -54,6 +54,8 @@ Relying only on GNU Make and simple CLI tools makes deployments robust and still
`mandatory`: Checks if all needed variables are set in config.mk.
`cleanup`: Runs `cleanup.sh` on each remote target, meant to be used to wipe contents of prior installations.
`prepare`: Creates needed directory for the deployment on the target system, sets secure file permissions for `secrets.mk`.
`build`: Calls `build.sh` locally. This is for building purposts, e.g. docker build and push.