📜 ⬆️ ⬇️

Atlassian Bamboo in pictures

In this article, I would like to share my impressions of using Atlassian Bamboo - Atlassian's system of continuous integration. In the Java project we are working on, initially JIRA On Demand was used as the management system, i.e. cloud version of JIRA installed on Atlassian servers. At a certain point, the need to introduce a system of continuous integration appeared. An important requirement when choosing such a system was the support out of the box of the Gradle automatic assembly system. Only a few systems of continuous integration met this requirement: the well-known Jenkins , Jetbrains TeamCity and Atlassian Bamboo . Under the cut outlines how it works and why we chose Atlassian Bamboo. Caution - a lot of pictures!

Home page



This is Bamboo's main page, which displays a list of so-called. build plans , i.e. independent sets of tasks that need to be performed with a certain frequency or under certain conditions, or when you start manually. Each plan can use the same source code, but run at different intervals or deploy the application to different servers. For example, in our case, it was necessary to deploy the application daily to the test server in automatic mode and collect the source code intended for putting it on production, but not putting it out. The main page displays a list of plans, their status and the latest changes in the code. You can also run the plan manually or go to the settings page.


On the “Current Activity” page you can see a list of plans currently being executed and a list of previously launched plans.
')

The page “My Bamboo” lists the plans in which there are changes made by the current account. Since Bamboo On Demand uses the same account as for JIRA, a list of JIRA tickets assigned to the current user and a list of plans with changes relating to these tickets are displayed. There is also a list of your favorite plans.

Plan page



Each plan has its own page, which contains a summary table of previous launches of the plan (builds), as well as graphic data on the ratio of successful and unsuccessful builds.


The build page contains information about the duration and success of the build and allows you to add comments.


In addition, there is a list of JIRA tickets and commits included in the build. Clicking on a ticket opens the corresponding JIRA page, and on a commit a Bitbucket commit page (as it turns out, owned by Atlassian and well integrated with other online services). In our case we are talking about Git commits, but other popular version control systems (Subversion, Mercurial) are also supported. From the same page, you can download the full log file related to the build, or see the statistics on the passed automatic tests. If the build is currently running, the green panel is a scale showing the current build progress, and the log file is updated in real time and displayed at the bottom of the page.


Files generated during the execution of the plan (so-called artifacts ) are available on a separate page for manual download. In the JIRA On Demand version, Atlassian servers store up to 1 GB of such files.

Plan setup



Plan Setup is a series of pages that let you set a plan name ...


... list of used source code repositories and connection settings ...


... the way to work with the branches of the source code (branches). Bamboo has several useful features when working with branches. First, it is possible to collect not only the main branch (master), but also all other branches of the repository, whose names satisfy the specified regular expression. For example, when using Git Flow, you can collect all branches containing feature / . This allows you to be more confident that the changes made in the feature-branches will not break the build, when infused into the main code. Secondly, automatic synchronization of changes between the master branch and feature branches is supported. Here it is possible to choose between two strategies: to merge successfully collected changes from the feature branch back to the master branch ( Gatekeeper ) or to insert changes from the master branch to the feature branch ( Branch Updater ). If the branch name contains a ticket name from JIRA, then such a branch will be automatically attached to this ticket for a quick transition.


The "Triggers" page allows you to customize the conditions under which the plan starts to run. For example, a build can be launched periodically at a specified time and only if changes are sent to the repository. You can run a build, at the end of a commit, using the mechanism of hooks (post-commit hook), or just once a day, as many teams do.

A Bamboo plan consists of a set of stages (stages), each of which may contain one or several jobs ( job ), which in turn consist of tasks ( task ). In the event that one of the jobs completes with an error, you can restart only this work, and not the entire plan. In addition, work in one stage can be performed in parallel. For example, you can create three stages - build ( build ), testing ( testing ) and deployment ( deployment ). In each of these stages, several source code trees can be assembled, tested, and deployed to different servers.


The set of built-in tasks is not very large, but it contains everything necessary for our needs. For example, you can build a project using Ant or Maven, run JUnit tests (or PHPUnit if you write in PHP), execute arbitrary shell scripts, deploy a war-file under Tomcat or Heroku, add tags to the version control system, copy files by Ssh and more.

Admin panel



Bamboo admin panel has many options. I will not describe such standard options as managing user access rights or viewing log files. The most important setting in Bamboo On Demand, from my point of view, is setting up the Amazon instances used to execute the plans. The thing is that Atlassian does not provide the computing power of its data center to build your projects. Instead, Bamboo uses your key from the Amazon Web Services API to create virtual machine instances and run plans on those instances. In the admin panel, you can specify your data for working with the AWS API, the type and number of created instances, the used virtual machine images (AMI) and the EBS volume. When you run the plan, Bamboo checks if an instance is already running, and if it is not available, it creates the required instance. By default, 300 seconds after the completion of the plan and in the absence of other tasks in the queue, the instance is turned off. When setting the instance configuration, you need to consider that Amazon On Demand pays for at least one hour of work, so in order to save, it makes sense to think about choosing a less productive instance, if there is an hour to complete all plans. You can also use EBS volume snapshots to store a relatively fresh version of the source code, since This will avoid a significant consumption of traffic when loading a full source tree with each plan execution (in large Git projects, the repository can be hundreds of megabytes and even gigabytes).

Integration with JIRA



Atlassian Bamboo is well integrated with JIRA and other Atlassian services. If you specify JIRA ticket names in commit descriptions, you can easily navigate between Bamboo and the pages of these tickets. In addition, the execution status of each plan is displayed in the JIRA status bar (Activity Stream).

Conclusion

I do not think that Bamboo stands out in its capabilities among other popular systems of continuous integration. However, it is very convenient to use it with other Atlassian cloud services due to good integration and a uniform user interface. Bamboo can be used in the cloud, or you can download it and install it on one of its servers. Information on pricing can be found here (in short, starting at $ 10 per month or $ 10 for downloading and licensing 10 developers). For small projects, the cost and time spent on supporting Bamboo On Demand is significantly lower than the similar costs of deploying a continuous integration system on our own servers, and good integration with JIRA allows for increased productivity, which is why we chose Bamboo for ourselves.

Note
If someone pictures seemed too small in size, the full archive can be picked up by reference .

Source: https://habr.com/ru/post/170581/


All Articles