[Bamboo Cloud docs]
[Bamboo Knowledge Base]
This tutorial outlines how to use Bamboo to run, and get rapid feedback on, builds for your Java project. Bamboo has the concept of a 'plan' to look after the configuration for your continuous integration workflow. So, to run your first build, you'll create and run a Bamboo plan.
This tutorial assumes you are using Bamboo Cloud, which allows us to make some assumptions about the resources available to Bamboo.
You can still use the tutorial if you are using Bamboo Server installed on your local network. You just need to make sure you or your company administrator have properly installed and configured Bamboo for running plans.
We also assume you have an individual Bitbucket account. If you don't, it only takes minutes to create one, and you can always delete it after you're done. You can use
A Bamboo plan specifies the source code repository, the tasks to run in your build, and when to trigger a build. We start by creating a new plan:
Every plan belongs to a project. We don't have a project yet, so choose Project > New Project, and enter details for both the project and plan.
Bamboo needs to know the plan name, plan key and a brief description of what the plan is for.
See Configuring plans for more details.
Bamboo needs to know where the source code repository is located, and needs permissions to access the repo, so that it can check out the code when it runs a build. Enter your Bitbucket credentials, and click Load Repositories to browse to your repository.
Connect to the demonstration
atlassian_tutorial/helloworld repo on Bitbucket for this tutorial, if you like.
See Linking to source code repositories for more details.
We can choose how Bamboo gets prompted to run our plan build. For this tutorial, we want Bamboo to run the build when code is committed to the repo:
Leave the Trigger IP addresses setting empty.
See Triggering builds for more details.
Each plan needs to have at least one task specified. Tasks do the real work of the plan.
A newly created plan has a default Source Code Checkout task that gets the source code from the source repository specified earlier.
See Checking out code for details.
We also want to compile the code, and run the unit and integration tests. We'll add a builder task to the Bamboo plan to do that. We assume that your project already has a build process set up that Bamboo can call.
Click Add Task, then Builder and choose the task that matches the build tool for your project. Expand one of the following sections to see configuration details specific to that builder task:
See http://ant.apache.org/manual/index.html for information about Ant.
Bamboo also supports Maven 1.0 and Maven 2.0.
See http://maven.apache.org/ for information about Maven.
See http://grails.org/doc/latest/guide/index.html for information about Grails.
Your tests will be run when the builder task compiles the code. Each of the builder tasks above has a section to tell Bamboo to expect test results and where to look for them. You can specify a custom results location if your project directory doesn't use the conventional structure.
See Configuring jobs and Configuring tasks for details.
Enable the plan, and click Create.
You should see the plan run. Bamboo will:
The 'Plan Summary' tab will report whether the build succeeded or not.
Tests in the appropriate directory in the source code repository will be run automatically as part of the build, and the test results will be displayed in Bamboo.
Now, whenever you commit a change to the repository, Bamboo will build your source code and report on your test results.
Bamboo displays a summary of the results of the build on the dashboard.
You can get further information about the build in the following ways:
See Getting feedback for details.