Over a million developers have joined DZone.

Adding Continuous Deployment to Atlassian Bamboo

DZone 's Guide to

Adding Continuous Deployment to Atlassian Bamboo

· DevOps Zone ·
Free Resource

If you're using Atlassian's Bamboo CI server, you might want to check out the XebiaLabs Deployit plugin.  It can help you achieve this continuous deployment/delivery that everyone's been talking about.

Over the past five to ten years, continuous integration has become a no-brainer for every medium to large scale software development project. It's hard to imagine going back to not having every commit (or push) automatically trigger a build of the code and, most importantly, a test run of of the code. That test run will surely include unit tests, but setting it up to also run integration tests used to be harder. You'll need to automatically deploy the application to the target middleware environment and then run the integration tests against that environment.

The Deployit plugin for the new 3.3 release of Atlassian Bamboo adds the enterprise-scale deployment capabilities of XebiaLabs Deployit to Bamboo. This allows you to speed up your development process by adding automated deployment to your continuous integration setup and make the the first step towards continuous deployment and continuous delivery. Instead of deployment being a bottleneck to your development process, it will be be an integrated part of it. You can test your application on the target platform as soon as possible, find any platform incompatibility and deployment issues early on, and, when it's time to deploy to the production environment, your deployment will be quick and reliable.

So how does it work? Bamboo version 3.3 has introduced the possibiliy to define new tasks in a plugin. These tasks can be added to a job to define what happens when a build is triggered. To take care of the deployment automation, we use Deployit, an application release automation platform that can deploy to many different middleware systems such as IBM WebSphere, Oracle WebLogic, JBoss and Tomcat, Apache HTTPD, Oracle Database, DB2 and other SQL databases, etc. And finally we use the Bamboo Deployit plugin to take care of the integration between the Bamboo and Deployit.

To get a demonstration of the possiblities, have a look at this video that shows Bamboo and Deployit working together to deploy to an Oracle WebLogic Server environment. Of course, the same can be done for any middleware supported by Deployit!

After installing the Bamboo Deployit plugin, you can add the following tasks to any Bamboo job:

  • Import a deployment package in Deployit
  • Deploy an application with Deployit
  • Undeploy an application with Deployit

The most basic task is the import task. Add that to the build job of a project that delivers a DAR file (the Deployit "deployment archive" format that includes all the artifacts and configurations that are part of an application; you can use the Maven Deployit plugin to create DAR files) to automatically import that deployment package into Deployit. But you can take it one step further: add the deploy task to your job to automatically deploy to a test environment and then add another task to test your application on that environment, e.g. by using JMeter or another functional testing tool. And of course there is nothing stopping you from deploying to the production environment instead of the test environment! Since you might not want every code change to trigger a deployment to the production environment, you can set up a separate Bamboo job that runs daily or according to whatever schedule you want to run your continuous deployment with Bamboo and Deployit!


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}