Our deploy pipeline looks like this:
1. An engineer makes a change to the code base and pushes it to the git repo.
2. Jenkins notices the change and runs ``mvn deploy`` on the new machine.
3. Maven uses maven-shade-plugin to build a single JAR file with a
MainClass which includes all the projects' dependencies.
4. Maven deploys this JAR as an artifact to our repository in Nexus.
The deploy story then looks like this:
1. Log into all the hosts via SSH.
2. Use curl or wget to download the JAR file for the version you're deploying.
3. Place it in the expected directory.
4. Signal to Upstart to restart the service.
(This is, of course, highly automated.)
But this is specific to how we work at Yammer.
The important, generalizable parts are:
* Deploy a single artifact to all environments. Re-compiling
everywhere introduces confounding factors for QA.
* Bundle your dependencies with your own code. If you need to bump a
library version, re-deploy the application. (If the application is
hard to deploy, fix that first.)
* Use continuous integration.
* Use an artifact repository.
I hope this helps.
--
Coda Hale
http://codahale.com