Atlassian has always focused heavily on providing API's for their tools, to allow integration by third parties. One way they do this is by keeping their tools open to integration with other tools. Integrations can open up a whole new world of automation with Atlassian tools. Some actions that can be achieved by integrating Atlassian products with other tools are creating an issue from a failed build, reporting an outage on HipChat and much more.
Atlassian tools are extremely able to be integrated and their out of the box usability can be extended by other top performing DevOps tools. In this instance, we will explain the integration points between JetBrain's TeamCity and Atlassian's JIRA and Bitbucket.
TeamCity is a build management and continuous integration server from JetBrains, that is completely Java based. TeamCity can build, check and run automated tests on a server, before committing any changes. Ensuring that your code base is clean, at all times. By constantly tracking different stages of your build, TeamCity can build reports on that data and have it ready for you to view, at anytime. This allows TeamCity to instantly notify you about any build problems or large changes that have been made.
TeamCity automatically contacts and assigns an agent to work on a new build, when it is shown that a new build is needed. The process thereafter is simple and for the following example, we will layout the process for a Maven build. The agent simply check's the TeamCity repository, performs the build and keeps track of the artifact.
The default configuration in TeamCity is to schedule a build automatically. However, when you configure TeamCity with Bitbucket, you can schedule the build to start on each push. TeamCity also has the ability to communicate with JIRA. Once integrated, TeamCity creates issues for failed builds and JIRA then pulls information needed for the ticket, about each build. In this blog, we will see how to configure TeamCity with JIRA and Bitbucket.
At this stage TeamCity is able to communicate with Bitbucket so that a build is made periodically. However, in order to get the functionality to make a build on every repository change, we need to configure a hook in Bitbucket.
Install the following add-on into your Bitbucket instance.
Then commit and push these changes to Bitbucket.
$ git add . $ git commit -m "Changes for TeamCity Testing" $ git push origin master
Install the following add-on into your JIRA instance.
In this blog you saw how to integrate Atlassian's Bitbucket and JIRA Software with TeamCity. This integration allows us to verify our code quality by performing regular builds. By seeing the code while you are building and seeing the status of each in JIRA, software engineers are now able to focus more on the code they are writing. Instead of spending quality time building and verifying your code.