Tired of the overhead of Hudson on Tomcat? Sick of the clunkiness of JUnit tests running in Ant? For simple projects, Simploy supercedes all that with a couple of classes.
java Simploy compileCommand testsRootFolder jarsRootFolder deployCommand [password]
Example:
cd /my/project/repository java Simploy "ant build" ./bin/tests ./lib "ant deploy" password123
Make sure it is running inside you project’s repository.
Set up a post-receive hook in your git repository to call a URL on your build server, for example: http:// yourserver.com:44321/password123
On Github that’s in “YourProject > Admin > Service Hooks > Post-Receive URL”. Everytime Github receives a push in YourProject it will call that URL.
If you pass it the optional password argument, Simploy will listen for that on port 44321.
Every 5 minutes and every time the hook URL is called, Simploy does a git pull. If there were new changes, it does the following:
-
Execute the command passed in to compile your code and tests.
-
Run all your classes ending in Test as JUnit tests.
-
If all tests pass, execute the deploy command passed in.
To get a status report on your build use: http:// yourserver.com:44321/
That’s it!