A small test of using travis-ci to build a github project and auto deploy it to heroku.
Create your webapp. For this I created a simple hello world webapp (1 jsp) with a dummy test (just to give travis-ci something to do).
Let's add that to travis.
Once your build passes - on the travis page you can see an icon - build passing. If you click on that you get a popup of build status links.
Grab the one that uses the same format you want to use for your README.
Create the README file if not already present and include the link to the image. For this test I used markdown README.md
Once pushed - refresh the github project page and you should see the build status icon.
Heroku's example uses embedded jetty - so update the app
And initial deploy:
$ heroku create web-hello-world Creating web-hello-world... done, stack is cedar http://web-hello-world.herokuapp.com/ | [email protected]:web-hello-world.git Git remote heroku added $ git push heroku master
And now we can test the deployment
We need to add the heroku information to the travis yaml file. We don't want to have the auth key in plain text - so grab the travis command line tool and then run
$ travis setup heroku
Make sure you choose to encrypt the key.
Change the app, commit and wait. Your change should arrive on the heroku site.
Once it's been tested and deployed - you can see the change