+add makefile.ci with file trigger (php-fpm container #2 will rm)

This commit is contained in:
xdrm-brackets 2018-02-19 15:01:14 +01:00
parent 13f35eb71c
commit 366985da64
2 changed files with 29 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/Dockerfile
/virtual/var/log
/virtual/trigger
/metactl/persistent/*

View File

@ -15,7 +15,7 @@ start-no-cache:
@bash ./metactl/pre-start.sh && echo "< done" || (echo "< failed"; exit 1);
@echo;
@echo "> [2] Build & launch environment";
@docker-compose up --force-recreate --build -d > /dev/null 2>&1 && echo "< done" || (echo "< failed"; exit 1);
@docker-compose up --force-recreate -d > /dev/null 2>&1 && echo "< done" || (echo "< failed"; exit 1);
@echo;
@echo "> [3] post-start script";
@bash ./metactl/post-start.sh && echo "< done" || (echo "< failed"; exit 1);
@ -30,3 +30,29 @@ stop:
@echo;
@echo "> [3] post-stop script";
@bash ./metactl/post-stop.sh && echo "< done" || (echo "< failed"; exit 1);
ci:
@echo "*************************";
@echo "* *";
@echo "* Launching CI loop *";
@echo "* *";
@echo "*************************";
@echo;
@echo -n "*** Create trigger.............";
@touch ./virtual/trigger && echo "done" || (echo "error"; exit 1);
@echo;
@echo "*** Launch environment.........launching";
@make start-no-cache | sed 's/^\(.\)/\t\1/g' || (exit 1);
@echo;
@echo "*** Wait for trigger...........waiting";
@while [ -f ./virtual/trigger ]; do sleep 1; done;
@echo;
@echo "*** Remove environment.........removing";
@make stop;
@echo;
@echo -n "*** Update source..............";
@git pull origin master > /dev/null 2>&1 && echo "updated" || echo "failed";
@echo;
@echo "*** Launch CI loop again";
@make ci;