+created metactl.ci{env,web} spies + ignore pid files

This commit is contained in:
xdrm-brackets 2018-02-19 21:34:16 +01:00
parent e50e67fbf4
commit 8b9aae6f26
3 changed files with 70 additions and 1 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/virtual/var/log /virtual/var/log
/virtual/ci /virtual/ci
/metactl/persistent/* /metactl/persistent/*
/metactl/ci/*.pid

29
metactl/ci/env.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
TMP="$(dirname `realpath $0`)";
TMP="`dirname $TMP`";
source $TMP/environment.sh;
#################################################
## ##
## Executed on 'env' Coninuous Integration ##
## ##
#################################################
TRIGGER="`realpath $ROOT/../../virtual/ci/env`";
while [ -f $TRIGGER ]; do
sleep 1;
done;
# 1. Go to root directory
cd $ROOT/../..;
# 2. Pull sources
git pull origin master;
# 3. Stop environment
# 4. Rebuild environment
( make stop; make start );

39
metactl/ci/web.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
TMP="$(dirname `realpath $0`)";
TMP="`dirname $TMP`";
source $TMP/environment.sh;
#################################################
## ##
## Executed on 'env' Coninuous Integration ##
## ##
#################################################
TRIGGER="`realpath $ROOT/../../virtual/ci/web`";
while true; do
while [ -f $TRIGGER ]; do
sleep 1;
done;
# 1. Go to root directory
cd $ROOT/../..;
# 2. Update submodule 'vhost'
git submodule update --remote;
# ...
# N. Recreate trigger
test ! -f $TRIGGER && touch $TRIGGER;
chmod o+rwx $TRIGGER;
sleep 1;
done;