diff --git a/.gitignore b/.gitignore index 75400d5..b1964e2 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /Dockerfile /virtual/var/log /virtual/ci -/metactl/persistent/* \ No newline at end of file +/metactl/persistent/* +/metactl/ci/*.pid \ No newline at end of file diff --git a/metactl/ci/env.sh b/metactl/ci/env.sh new file mode 100644 index 0000000..750a5f4 --- /dev/null +++ b/metactl/ci/env.sh @@ -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 ); \ No newline at end of file diff --git a/metactl/ci/web.sh b/metactl/ci/web.sh new file mode 100644 index 0000000..08f4501 --- /dev/null +++ b/metactl/ci/web.sh @@ -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; \ No newline at end of file