Getting Started with the Heroku Plugin for Atlassian Bamboo

Last Updated: 27 November 2013

atlassian bamboo continuous integration deployment

Table of Contents

This article only applies to applications in Heroku Enterprise for Java packages.

You can integrate Atlassian Bamboo with Heroku using the Heroku Plugin for Bamboo. This article will guide you through setting up the plugin and deploying WAR artifacts to your Heroku apps from Bamboo to build continuous integration workflows.

Pre-Requisites

  • Atlassian Bamboo 4.0 or higher and a working knowledge of the application.
  • A Heroku account. Sign up for an account, if you don’t have one.

Installation

  1. In Bamboo, go to Administration | Plugin Manager | Install Plugins.
  2. Search for the Heroku Plugin for Bamboo.
  3. Expand the entry and click Install.

Example WAR Deployment Plan

  1. In Bamboo, click on Create Plan | Create a New Plan.
  2. Complete the form with details about your project and click Configure Tasks.
  3. Add a task to create the WAR artifact to your plan. For example, in Maven-based projects, this would typically be the package goal.
  4. Click Add Task and choose the Heroku: Deploy WAR Artifact task.
  5. In the configuration form, specify the API Key, App Name, and WAR File to use. Your API can be found on the Heroku account page. If the app name specified does not exist, it will be created for you. The WAR file should be the relative path to the artifact created in the previous step. Click Save. Configuring WAR Deployment
  6. Complete any other plan details and enable the plan.
  7. click Run | Run Plan.

Tasks

WAR Deployment

This task deploys a WAR file generated by your build directly to a Heroku app.

To deploy a WAR file, first make sure your build is successfully creating a deployable WAR file. If you are using Maven with <packaging>war</packaging>, the mvn package command will output the WAR file into its target directory. Otherwise, create the WAR file in whatever way is appropriate for your build.

After the WAR file is created, add the Heroku: Deploy WAR Artifact task to your plan configuration and specify:

  • API Key: Your Heroku API key to use for deployment. Your Heroku API key can be obtained from your Heroku account page.
  • App Name: The app to which to deploy.
  • WAR File: Relative path to the WAR file created in a previous build step to deploy