Case study: TeamCity in Devbridge

This guest post is brought to you by Arunas Paskevicius, Web Developer at Devbridge Group. Based on the original CI with TeamCity Server“ post in the Devbridge blog.

Pre-TeamCity

A few years ago, most of our projects were just plain .NET web applications, and using one CI server (CruiseControl.Net) was enough. But as the company grew, so did our client base, and we realized not everyone wanted their projects to be written in C#. We started offering solutions created with PHP, NodeJS, Objective-C, Java and other languages. We also began using other tools for CI. For instance, we used Jenkins, and it ended up causing some problems.

The first problem was that some teams used CC.NET, while others used Jenkins. Sharing reusable build steps was problematic, because they were either “shell scripts” or CI application dependent configurations, not to mention we were dealing with different OS installations (Windows, Linux, OS X) on each of our CI machines.

The second problem was the usage balance between our CI machines. Some machines were used for running development and testing builds, others were used for deployment. For us, development builds occur frequently, so the machine responsible for this was always at max capacity while the production build machine wasn’t used nearly as much.

Deciding

After a frustrating time, we decided that we needed a single CI environment where we could reuse our existing CI machines. This would allow for a painless transition from other CI software.

We took Jenkins, Go CD, Atlassian Bamboo and JetBrains TeamCity and installed them on our test machine for comparison. Next, we created build configurations for already existing projects and checked for the following:

  • Simplicity of creating a build
    To move everyone from their current CI software to the new one, we wanted it to have a simple and clear way of creating builds so that the learning curve would be as low as possible.
  • Build reusability (templates, etc.)
    A lot of our projects use mostly the same build steps, so we need a way for creating templates and other ways of reusing those configurations.
  • Scalability
    We wanted our CI machines to be easily managed, added and balanced for our builds. The ability to intelligently pick the right machine for the build was necessary.
  • Active Directory support and role management
    At Devbridge Group, we use Active Directory to manage user accounts, groups and permissions. The CI software that we chose had to support authorization and, if possible, groups.
  • Ease of configuration and the overall look and feel
    Using an ugly piece of software should be a thing of the past. We wanted the software to be easy to understand, aesthetically pleasing and responsive.
  • REST API
    We needed the software to have a RESTful API so that we could connect it to our other monitoring software, re-run builds and so on.

Choosing TeamCity over others

The reason we picked TeamCity was because it had the best results for our necessary requirements.

  • Simplicity of creating a build
    Creating builds in TeamCity was a breeze. TeamCity came bundled with most of the tools (runners) we needed for C# and JAVA projects. To create the build steps, we just needed to select a runner in correct order with one or two additional parameters. For PHP we just downloaded “meta runners” from the official JetBrains GitHub repository and created build steps. Additionally, we were pleased that it’s possible to create artifacts from a build and then use it as a Report page. For example, code coverage.
  • Build reusability
    TeamCity has templates that make it possible to copy build configurations from one project to another. It’s possible to create beautiful, reusable templates and add configuration parameters so that when you create a new build from the template, you can specify certain data: build.xml location, GIT tag prefix and so on.
    Another great feature is the meta-runner. It allows the user to create smaller templates for a specific sequence of build steps. For example, you can create a Heroku deployment build step sequence, then extract them all into a single runner, and use it in other templates or even share it with the world (like JetBrains did with the meta-runner power-pack).
  • Scalability
    TeamCity has agents that can be installed on different machines and will then connect to the central CI server software. The central software manages which agent will be used for each build. Additionally, you can define requirements for the agents to use. You can achieve this by using the parameters provided by each agent (you can also add your own).
    If you have more than one agent assigned, then your builds will be intelligently divided among those agents and the agents that don’t meet your requirements will be automatically skipped.
  • Active Directory support and role management
    This was the first thing we actually checked for. We were pleased to find that TeamCity supports both AD user and group synchronization. This made our lives easier because we could assign specific roles for specific groups.
    The overall user and role management is some of the best we’ve seen in CI.
  • Ease of configuration and the overall look and feel
    TeamCity has pretty simple configurations. Most of them, apart from LDAP, were done in a good-looking admin panel on the main CI server, eliminating the need to dig through a pile of XMLs or run through unclear lists of data.
  • REST API
    TeamCity comes with a REST API that is well documented and has a lot of action calls that can be used in your own software: triggering/stopping particular builds, getting build test information and event triggering a whole CI server and backup.

Half a Year with TeamCity

Since we started using TeamCity, creating and managing builds became significantly easier. We already have templates and meta-runners for creating new projects, and we are no longer divided by using separate software to achieve the same results. Additionally, we’ve eliminated the problem of having some CI machines idle while others are maxed out.

Overall, we think that TeamCity is a powerhouse that has strong features for JAVA and .NET projects. It also allows simple creation of additional runners and templates for any language and platform you might choose.

devbridgeDevbridge Group is an international software design and development company that builds comprehensive, custom solutions for enterprise mobile and web. Devbridge combines engineering expertise with elegant design aesthetic to deliver exceptional results for leaders in the manufacturing, healthcare, financial services and retail industries.
Devbridge Group produces more than 100,000 engineering hours annually, building custom cloud-based and mobile solutions. Long-term partnerships with Devbridge are built on trust and transparency. The company follows a streamlined agile process, is committed to Responsive Design, and always pursues excellence.
Posted in Uncategorized | Leave a comment

TeamCity 9.0: Best for Pandas

Winter releases of TeamCity are practically a tradition: we lovingly released TeamCity 8.1 this year just before St. Valentine’s day and now we really cannot think of a better way to end the year and celebrate Christmas than to present you with a brand-new TeamCity 9.0! Please give a welcoming round of applause for TeamCity 9.0 which has just been released!

With the server clean-up in background, TeamCity 9.0 finally has zero maintenance downtime which is great news for distributed teams, who no longer need to worry about scheduling the clean-up.

Besides, the new version comes with the ability to move projects between TeamCity servers preserving the project data and changes history as well as user profiles, and all of this is done right from the TeamCity web interface. We hope you’ll love this feature for its clarity and ease of use:

Another significant addition is storing project settings in version control – Git and Mercurial in this release. Keep track of your settings the same way you do with the source code:

There is so much more – see our What’s New and Release Notes!

Download TeamCity 9.0 and start enjoying the benefits of the new version immediately!

Oh, and if you are wondering about the title, find out why TeamCity is best for you and pandas on our web site!

Merry Christmas and happy building!

Posted in Blogroll, Bugfix, EAP, Features, FYI, News & Events, Tips&Tricks | 12 Comments

TeamCity evolution in the past 5 years

Dear TeamCity users!

Every new TeamCity release brings lots of changes, and oftentimes we are not sure how successful they will be, or they might seem minor at the time. This is especially noticeable if we come across an old TeamCity version and, looking back, we realize how accustomed we are to many of the features that once were a novelty. So today we decided to review the evolution of our CI server and remind you of the most significant features brought to you by the releases in the past 5 years.

Now we easily create projects in TeamCity by simply giving it a URL – the feature is barely a year old, it came with TeamCity 8.1 in February of 2014:
create_project_from_url

When you look at the internal JetBrains TeamCity server with over 300 nicely arranged projects, it’s hard to imagine now that less than two years ago, TeamCity had no projects hierarchy, introduced in version 8.0 in June, 2013:
projects_hierachy

Version 7.1 came with support of feature branches for Git & Mercurial, which was a huge success with our users. This feature is also used by our internal JetBrains teams so extensively, that it is not clear how we were able to release at all BFBS (before feature branches support):
branches

Build failure conditions, as well as NuGet support were introduced in TeamCity 7.0 in February of 2012! But more astonishing is the fact that this was the time when Agent Pools were introduced for the first time – with over 200 agents and more than 20 agent pools on the TeamCity server here at JetBrains, we see how efficiently our resources are allocated thanks to this feature:
agent_pools

TeamCity 6.5 made all features of the Enterprise Edition available in the free Professional Edition allowing unlimited number of users.

Multiple build steps – an indispensable feature today! – were announced almost 4 years ago, on December 1, 2010 when TeamCity 6.0 was released.
multiple_build_steps

And finally, already 5 years ago, TeamCity 5.0 saw the light with cloud Build Agents on Amazon EC2 and issue trackers integration, which at present are unnoticed, as they are convenient and used every day!
issuepopup

We hope that you enjoyed our short history course. If you come to think of it, it’s pretty amazing actually how much our features have evolved, not to mention the user interface, which is way prettier now!

We would like to thank all of our you, our long-term users and supporters as well as newbies for your dedication to TeamCity! The new version is on its way, and we do hope that it will bring more cool features worth trying and remembering, so don’t miss TeamCity 9.0!

Stay tuned and happy building!

Posted in Blogroll, Design decisions, FYI, Uncategorized | Leave a comment

TeamCity 9.0 RC is out

Hello everyone!

Winter has finally settled with cold and snow, and our code is frozen too to let us apply the final polishing touches before TeamCity 9.0 release.

We’ve been working our fingers to the bone, and today we are announcing the TeamCity 9.0 Release Candidate containing over 140 bugfixes since the previous EAP! We’ve made some improvements to our project import, REST API, and audit – for the complete list, please see our Release Notes!

Download the TeamCity 9.0 RC build today to keep you busy over the weekend! We can’t wait to see how this build works out for you in the end, so please share your feedback!

TeamCity 9.0 release build is on its way!

Stay tuned and happy building!

Posted in Bugfix, EAP, FYI, News & Events, Uncategorized | Leave a comment

TeamCity VMware vSphere plugin

TeamCity always aims at giving your team more build power, and for those of you taking advantage of local cloud capabilities with VMware vSphere, the new TeamCity VMware vSphere plugin will surely be an asset. With this plugin, TeamCity can start and stop TeamCity agents installed on VMware virtual machines on demand, similarly to integrations with Amazon EC2 and Azure .

TeamCity-VMware cloud agent integration requires:

  • the TeamCity VMware vSphere Cloud plugin (compatible with TeamCity 8.1+) installed on the TeamCity server;
  • a configured virtual machine with an installed TeamCity agent in your cloud set up to start the TeamCity agent on boot,
  • a configured cloud profile on the TeamCity server.

Let’s go step-by-step and set up the integration.

Install the plugin and configure the virtual machine

Since the plugin is not bundled with TeamCity, we need to install it on the TeamCity server. Next we need to create a virtual machine where our builds will run.

The virtual machine with the TeamCity agent needs to be prepared as described in our documentation; when configuring the TeamCity build agent, be sure to specify the valid TeamCity server URL in the build agent properties.

After you start the build agent, it connects to the server, and you need to authorize it in the TeamCity Web UI so that the builds can run on the agent. Please ensure that the agent that connected to the server can actually run the builds you want it to run later.

When configuration and testing is complete, power off the virtual machine. If we want TeamCity to clone this virtual machine for us, we need to create a snapshot of this virtual machine.

You can also use the machine you created to make a template, see more information in the VMware vSphere documentation.

Configure the TeamCity VMware profile

Next we need to create an agent cloud profile in TeamCity on the Administration | Agent Cloud page selecting VMware vSphere as the cloud type.

A profile name is required; it is also recommended to configure the Terminate Instance Idle Time setting which will save you the resources: it specifies the period of time for the virtual machine to run without builds after which TeamCity will stop it. You also need to provide the cloud access information, including the vCenter SDK URL and your user credentials.

You can verify your credentials using the Test connection / Fetch options button, which also refreshes the information on the virtual machines, snapshots and resources available in your cloud.
CreateCloudProfile1
Now we can add images and specify the virtual machines or templates we want TeamCity to use.

The VMware vSphere plugin can either start and stop an existing virtual machine, or clone virtual machines from snapshots deleting the clone after the machine is stopped. For templates only the clone behavior is supported.

Click Add Images and select the virtual machine and the desired behavior. For the clone behavior, select the snapshot to use, the folder for clones and the resource pool where your machine will be allocated. The maximum number of instances will limit the clones created.

In this test set up we are using the clone behavior with 2 being the maximum number of instances: TeamCity will clone a machine from the specified snapshot and will delete the cloned machine after it is stopped:
AddNewImage

When the images are added and the profile is saved, a clone is created from the snapshot. It connects to TeamCity and TeamCity processes build configurations-to-agents compatibility.

As with all cloud integrations, you can view and manually start/stop the cloud agents on the dedicated Agents| Cloud page in the Teamcity Web UI:

cloudInstancesVMware

Our integration is configured. Now when distributing queued builds, TeamCity will start a compatible agent in vSphere if required.

The agent will be authorized automatically and will start running builds. The Agents page will display the builds running on the cloned machines:

agentBuilds

Try the plugin and don’t hesitate to share your feedback with us!

Happy building!

Posted in Blogroll, EAP, Features, FYI, How-To's, News & Events, Tips&Tricks | 4 Comments

Welcome TeamCity EAP4 Build 31693

Dear TeamCity users,

Time flies and we are pleased to announce the new TeamCity EAP4 build 31693. This release contains further improvements in projects import and over 100 bug fixes!

This is the last EAP for TeamCity 9.0, chances are we’ll publish the 9.0 RC build in a week or so. Please see our release notes and download this build to try out the improved TeamCity features!

We invite you to share your feedback with us!
Stay tuned for the news on the Teamcity 9.0 RC and happy building!

Posted in Blogroll, Bugfix, Design decisions, EAP, FYI, Tips&Tricks | 2 Comments

Improving Software Development through Automation with TeamCity – 2 Day Workshop in NYC, December 8-9

TC_Workshop_NY__Automation_W

If you want a jump start improving software development with automation, consider this workshop with Wes Higbee in New York, NY. This two day workshop will provide hands on examples and the opportunity to apply the techniques to your own software projects.

There are many more details on the workshop Eventbrite page including details about what’s in it for you, the agenda, links to videos and sample materials.

Sign up before November 25th and get 10% off individual tickets and team passes. If you own TeamCity you are eligible for a separate discount on individual tickets and team passes. Please contact Wes from the Eventbrite page.

To learn more and register for this workshop visit the official page, Improving Software Development through Automation with TeamCity.

Posted in News & Events, Partner | Tagged , , | Leave a comment

Send Visual Studio Online Team Room Notifications from TeamCity

Continuous Integration is all about quick feedback on changes in our code. TeamCity lets us subscribe to important events that may take place during the build process, such as succesful builds, build failures and so on. Email, Jabber, IDE and Windows Tray notifications are supported out of the box, but we can also post these notifications to Visual Studio Online Team Rooms using a newly released plugin.

VSO notification

With Visual Studio Online Team Rooms, we can keep a record of things that happen in our team – checkins, work item updates, code reviews and so on. Team members can have conversations with each other directly in the team room. TeamCity can contribute to the conversation, by posting notifications around builds to the team room. Let’s see how we can configure this integration.

Enabling and Configuring Team Room Notifications

After installing the plugin, we have to enable the integration from the Administration | Server Administration | VS Online Notifier page. Once done, we can configure notifications from within a user profile. In the top right corner of the screen, we can click the arrow next to our username and select My Settings & Tools from the drop-down. We can then setup notifications under the VS Online Notifier tab.

Setup Visual Studio Online Team Room notifications

Team Room notifications will be sent by the user profile we configure here. We’ll have to provide the Visual Studio Online account name, the full Team Room name and a username and password to connect to it. Do make sure to enable alternate credentials in Visual Studio Online to be able to send notifications on behalf of this user.

Once the connection has been tested and saved, we can tell TeamCity which notifications we want to see for one or more build configurations. Check the documentation for a list of the available notification options and how to work with them.

Add new Rule

After saving the rule, TeamCity will send notifications to the configured Visual Studio Online Team Room as events happen.

TeamCity posts message to VSO team room

Every TeamCity user can configure these notifications. In the above screenshot, we’ve created a special “TeamCity user” in Visual Studio Online. It’s perfectly possible to send notifications from other users, too. When multiple users have configured the same events, TeamCity will merge these messages in one so the Team Room is not flooded with the same information.

We can add more information to the notifications if needed, by customizing notification templates. For example, we can add the error messages from the build log or add additional build details in the notification.

Happy building!

Posted in Features, Tips&Tricks | Tagged , , , | Leave a comment

Integrating TeamCity and Visual Studio Online Work Items

Continuous Integration only makes sense if there’s an easy way to verify the quality of our codebase and when we can easily correlate builds with our issue tracker and the source code itself. Out of he box, TeamCity provides integration with YouTrack, JIRA and Bugzilla. We can also install plugins to integrate with other issue trackers like GitHub and FogBugz. Today, we’re happy to announce another issue tracker integration: the Visual Studio Online Work Items plugin.

We’ve already blogged about how we can link Visual Studio Online source control with TeamCity and run our builds.When using Visual Studio Online (VSO) as an issue tracking system as well, we can use the Work Items plugin to provide a direct link between the build and version control history in TeamCity and the Work Items that were associated with them.

Work Item integration with TeamCity

How does it work?

After installing and configuring the Visual Studio Online Work Item plugin, TeamCity will parse version control check-in messages and transforms the Work Item ID into a link that brings us to the full work item. A direct link will be available on the Changes tab of our build results. The Issues tab will show us a list of all Work Items that are associated with the build. And in the build configuration home page, we can also review Work Items mapped to comments from the Issue Log tab.

Work Item link in Changes

The plugin does not look at the Work Item Association, but instead uses the check-in message to provide these links. This has a big advantage: it works with both Team Foundation Version Control (TFVC)-based projects as well as the increasingly popular Git-based projects. This does mean we have to keep two things in mind:

  • When checking-in changes, always mention the related Work Item ID in the check-in comments.
  • On the Issue Log tab of a build, we can tick the Show only resolved issues option to only display issues that were fixed in the build. This does mean we have to resolve Work Items when they are fixed.

How to configure it?

To enable integration, we need to first install the Visual Studio Work Items plugin. Next, we have to create a connection to our Visual Studio Online project from the Administration | Issue Tracker page. After selecting the Visual Studio Online connection type, we have to provide a display name, our Visual Studio Account name, and a username and password to connect to it. Do make sure to enable alternate credentials in Visual Studio Online!

We also have to provide the collection, the project name and the issue pattern to detect. The default is #(\d+), which will recognize Work Item IDs that look like #10, #99 and so on. We can customize this so we can detect other patterns. The Test Connection button lets us verify all connection details are correct.

Visual Studio Online configuration

Once saved, TeamCity starts to match each Work Item ID it recognizes in the project’s check-in history.

Happy building!

Posted in Features, Tips&Tricks | Tagged , , , | 3 Comments

TeamCity 9.0 EAP3 comes with project import, favorite builds and more!

Hello, our dear readers! Have we got the most exciting news for you! Although it feels like we just announced opening the TeamCity 9.0. EAP, it’s almost time for the release and we are presenting TeamCity 9.0 EAP3 build 31886 today!

We promised you the ability to move projects among servers as one of the great new features of TeamCity 9.0, and in this EAP you get the feel of what it’s eventually going to be. We were contemplating on different implementation approaches, and initially considered to add the ability to export projects from a TeamCity server, but then we realized that we already have what we need in a regular backup file, so we switched to project import! Now all you need to do is create a backup file on the source server and then select projects you want to import on the target server. Read more in our Release notes.

Another useful feature of this release is favorite builds – you can now star your favorite builds and they will be listed on a dedicated page. Optionally, you can also configure notifications for your favorites.

The TeamCity web UI is getting more and more user-friendly: now you can create and modify custom charts right from the UI.

Those of you who use meta-runners will love the new option to create a build configuration from a Meta-Runner, which makes it easier to fix problems in the Meta-Runner and verify the fixes.

Among other features is the ability to compress artifacts to a 7-zip archive, new options for Perforce VCS roots, the ability to push parameters to dependent builds when using snapshot dependencies, etc.; these and about 150 fixed issues are listed in our Release notes.

Download the newest TeamCity build and give it a test-drive now! We are anxious to hear your feedback - help us to make TeamCity better!

Happy building!

Posted in Blogroll, EAP, Features, FYI, How-To's, News & Events, Tips&Tricks | 2 Comments