- src/gh-webhook: hook service to listen for github.com callbacks. Once triggered, will run check-push.sh shell script to have one-shot check.
src/check-push.sh: main logic of the engine, can be called by web hook or by timer loopsrc/prod2latest.sh: shell script to be run in HOST env, to figure out the latest version release code copy and update the latest symlinks.src/cleanup-archives.sh: shell script to clean up archive files under /copies/.archives/
- Sample settings in docker-compose.yml in the code tree.
- Volume to store all the data: git_repos, (code)copies, scripts.
- Volumn to store the ssh keys to access github.com repos.
It's the default command entry for docker image, will listen on :9870 port.
If want to run a timer loop instead of web-hook, need to:
- Must set SLEEP_TIME env for docker-run, to specify the timeout values(seconds)
- Specify the command as
/srcripts/check-push.shfor docker-run - If no SLEEP_TIME env, the script will be run as one-shot checking.
In HOST, under the path /git_repos/, just use the regular git clone the target repos.
All the scripts will be visible to HOST in the path: /scripts/.
- first time to launch all tests:
./tests/launch-testing.sh - if testing env is ready, to run:
./tests/scripts/test-check-push.sh - to clean up test env, to run:
./tests/scripts/cleanup-test.sh
After everytime to run the test scripts, the results can be checked in ./tests/work.test/copies/