Skip to content

Commit

Permalink
Cron is bad for CI, use a looping shell script instead
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Dec 4, 2012
1 parent 0c1bdd2 commit d3a03f9
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions ghettoci/main.py
Expand Up @@ -107,16 +107,32 @@
due to internal error, the command outputs the result. Otherwise
command outputs nothing. Exit code 0 indicates that test succeeded.
Then just make Ghetto-CI to poll the repository in UNIX cron clock deamon.
Create a dummy UNIX user which can checkout and pull updates on the source code.
Create file ``/etc/cron.hourly/continuous-integration-tests`` which will hourly run the tests (Ubuntu example)::
Deployment on the server
---------------------------------
#/bin/sh
sudo -i -u yourunixuser "ghetto-ci /my/svn/repo /tmp/status-file.ci 'cd /my/svn/repo && bin/test'
.. note ::
On Windows you can accomplish this using any automator provided by your operating system vendor.
Createa a wrapper script which executes all the CI commands (TODO example).
Create a wrapper shell script which runs ghetto-ci command with 5 minute interval
ci-loop.sh::
#!/bin/sh
#
# Run CI check for every 5 minutes
#
Naturally the command to launch the tests is specific to your software project.
while true
do
continous-integration.sh
sleep 300
done
On Windows you can accomplish this using any automator provided by your operating system vendor.
Start script automatically on the server start-up (TODO).
Tips
------------------------
Expand Down

0 comments on commit d3a03f9

Please sign in to comment.