SBT runner for TeamCity

If you use the power of Scala in your projects then we have news you may find interesting.

We have created a plugin for TeamCity that natively supports SBT builds which means you can build the code and run tests with TeamCity and see the results in a handy way. When SBT runner is installed into your TeamCity server all you need is to pick ‘Simple Build Tool (Scala)’ runner when creating a new build step for your build configuration. Default ‘Auto’ installation mode provides latest version of SBT on every TeamCity agent your build will be running on. No additional actions from your side are required. Add the commands you like to run and enjoy the results.

Auto mode

If something goes wrong, e.g. compilation errors occur or tests fail, you will see the details in an easy to read form.

error in compilation

tests view

If you have pre-installed SBT manually you can choose ‘Custom’ mode and specify path to SBT home directory.

Custom mode

In this mode you need to install sbt-teamcity-logger either as a plugin for your project or as a global plugin for your SBT installation. You can find more details on GitHub.

In fact, the whole support for SBT builds consists of two independent parts.

  1. TeamCity plugin that provides convenient way of setting up build step for the configuration, and

  2. SBT plugin that wraps SBT native messages in the way TeamCity can consume and understand.

In case you cannot install the plugin to your TeamCity server, you still have a way to get reporting for SBT builds. Add sbt-teamcity-logger to your project or SBT installation as mentioned above and create ‘Ant’ build step that will run SBT as a regular java process. Build results will be shown in handy way.

SBT runner is available for the latest TeamCity versions. Download it for TeamCity 8.0 or for TeamCity 8.1. Try it out and let us know what you think!.

Posted in Features | 8 Comments

TeamCity 8.1: Give it a URL, Give it a Try

Greetings to all of you and congratulations on the arrival of TeamCity 8.1!

It’s half a year since TeamCity 8.0 shed light on your continuous integration process, and just when you thought you got the most fantastic build server of all, we are releasing the new and improved TeamCity 8.1!

Creating your first build in TeamCity has always been simple, but it could still be somewhat daunting for a newbie, so we did our best to simplify this process. Let’s just say TeamCity cements its reputation as the intelligent Continuous Integration Server with version 8.1: just give it the URL of your project in a version control system and jet to your first build! Seeing is better than reading, so watch the magic in action:

Besides being smarter than ever and remarkably easy to install, set up, and manage, TeamCity 8.1 brings you feature branches auto-merge for Git and Mercurial, it comes with full support for Visual Studio 2013, Subversion 1.8, Xcode 5, and more!

The list of all the benefits you gain from the new version is way too long for a blog post, so see our What’s New on the product web site and our documentation for details.

Download TeamCity 8.1 now!

Happy building!

Posted in Features, How-To's, News & Events, Tips&Tricks | Leave a comment

TeamCity 8.1 RC (build 29848) is here

Greetings! We’ve been busy since introducing the TeamCity 8.1 EAP back in October 2013. Now, after several months of working on new features, we are happy to say that TeamCity has become more stable and today we are announcing the availability of the TeamCity 8.1 Release Candidate!

In addition to the improvements in previous EAP releases, TeamCity RC build 29848 brings you:

  • command-line build steps detection when creating a project using a URL: TeamCity now proposes running command-line build steps. At the moment, .pl, .sh, .cmd and .bat scripts are supported.
  • improved error reporting for TFS

More performance and usability issues have been fixed – see the complete change log for details. Download TeamCity 8.1 for final testing and feel free to leave here any questions or comments on it!

It’s almost time to kick TeamCity 8.1 out the door, and we plan to get this released to you shortly, so stay tuned!

Happy building!

Posted in EAP, Uncategorized | 2 Comments

TeamCity 8.1 EAP (build 29790) is available

TeamCity 8.1 is on the way planned to be released in first half of February 2014! We can feel your anticipation building, so you are in for a treat with this TeamCity 8.1 EAP build as it comes with a number of great features!

Improved Build Artifacts Configuration

When you set up a new build configuration, you might have a very vague idea of what the names and paths of your build artifacts will be. Now, after creating a build configuration and running the first build, TeamCity will show you the build checkout directory browser, listing the directories/files available there. All you need to do is click the directories/file names and the paths to the artifacts will be set. Another handy feature is the file size displayed in the same browser to let you know how much disk space will be consumed.

Changes Page UI

TeamCity interface is getting cooler with the reworked Changes page. Now each change has a new pie-chart icon, the pie slices showing the relative size of pending, successful, as well as old and new problematic builds affected by the change.

More Accurate Build Run Time Estimation

Prior to this version, the calculation of the running build duration was based on the average run time of the latest builds of a build configuration. Now TeamCity uses a new algorithm taking into account build stages reached by the build: if a build is still executing a build step and TeamCity knows that there are two more build steps, the system will calculate the time left for the current step execution and add the time required to complete the next two steps. The granularity of the build process analysis makes the estimates more accurate.

Other Improvements

This EAP also includes:

  • improved performance of the restore from backup operation;
  • the ability to set up an artifact dependency on a previous build of the same build configuration, which was requested by a number of TeamCity users;
  • ability to copy templates, which was another frequent request;
  • Maven 3.1 now bundled with TeamCity;
  • the bundled Ant is updated to version 1.8.4

We continue working on usability and performance, fixing bugs and getting rid of imperfections  - see the full list of changes for details!

Download the new EAP! We really appreciate you helping us a great deal to make a great product and we are excited to hear your feedback on this build before applying finishing touches to TeamCity 8.1!

Happy building!

Posted in EAP, Features, FYI, News & Events, Tips&Tricks | 1 Comment

TeamCity 8.0.6 is available

Since bug fix release 8.0.5, many of our users and developers have contributed to making TeamCity an even better product, and today we announce TeamCity 8.0.6.

The new version comes with complete support for Visual Studio 2013, including the VS Addin, and TFS 2013. ReSharper-based Inspections and Duplicates runners are fully compatible with Visual Studio 2013 as well. Besides that we also bundled the new version of dotCover – 2.6.

This release contains more than 50 fixes including those related to integration with IntelliJ IDEA 13. It also comes with a number of performance improvements, and if you are using TeamCity 8.0.x, we strongly recommend upgrading to the newest version.

See our Release Notes for the full list of fixes and download the new build now!

Happy Building!

Posted in Features, FYI, News & Events, Tips&Tricks, Uncategorized | Leave a comment

TeamCity 8.1 EAP (build 29687) is available

We hope you enjoyed Christmas and New Year holidays, and are ready to try another TeamCity EAP build :). Let’s see what we prepared for you.

We continued improving administration of build configuration and projects:
- now a project can be created from just a repository URL
- most of the settings of the build configuration inherited from a template can now be redefined
- build configuration settings that differ from defaults are now highlighted
- TeamCity learned to suggest additional configuration options

Another addition is for those who struggled with distribution of Git private SSH keys among agents. You can now upload SSH private key into TeamCity project and then select uploaded key in Git VCS root settings.

There are also other improvements: ability to view changes of any user on My Changes page, complete support for Visual Studio 2013 and TFS 2013 in TeamCity VS Addin, and others. See change log for the full list.

TeamCity 8.1 is planned for February 2014, but before that we still have a couple of improvements to announce, so stay tuned!

Download new EAP build and let us know what you think.

Happy building!

Posted in EAP | 1 Comment

TeamCity 8.1 EAP (build 29581) is here!

Christmas is coming early this year with TeamCity 8.1 EAP 2! We carefully collected your wishes, and this release arrives gift-wrapped with more than 150 bugfixes, but most importantly, our fascinating new features are there for you to play with! Let’s see the gifts TeamCity brings you this December!

Better TeamCity Administration Experience

They say grown-ups don’t believe in magic, but this will certainly change once you see the improved TeamCity administration interface! Creating a build configuration has never been easier – all you have to do now is enter your repository URL and just watch the magic working: TeamCity will automatically create a VCS root for you, suggest build triggers, failure conditions and build features, and more than that – it will detect your project file and suggest adding a build step if your repository contains an Ant, NAnt, Gradle, Maven, MSBuild, Visual Studio solution file, a Powershell, Xcode project file, or a Rake and IntelliJ IDEA project! Aren’t you excited? We definitely are!

Enhanced REST API

The magic continues with the TeamCity REST API bringing you a bag of opportunities! You can now

  • trigger a build
  • list queued builds
  • stop a running build
  • expose canceled build details
  • query for investigations for a build configuration, problem or test
  • get investigations assigned to a user
  • list the build’s tests, list all test runs and more!

We really strive to make our users almighty!

Support for Visual Studio 2013

TeamCity is choreographed to waltz with Visual Studio 2013 supported in the VS addin, and .NET Inspections and Duplicates runners! Would you like to dance?

Improved Torrent Plugin

It’s up to you to decide which gift you like best, just one more thing before you get absolutely ecstatic and start looking for this build’s download link: we are happy to say that the new version of the Torrent Plugin comes with the considerably improved performance and stability! It is readily available for download here and we are anxious to hear your feedback!

TeamCity 8.1 EAP 2 is loaded with new features to help you get into the holiday spirit! Don’t just believe us – check out the release notes for this EAP for the full list of new features and improvements, download the build and try it out! We are thrilled to know what you think!

Happy holidays and Happy building!

Posted in EAP, Features, News & Events, Uncategorized | 2 Comments

TeamCity 8.0.5 is Out

We are happy to announce TeamCity 8.0.5! It comes packed with more than 60 bug fixes, among which there are a few performance improvements that should benefit many users and a fix for a bug in TFS support which caused connections leak on the server in some cases. So, if you are using TeamCity 8.0.x, it is highly recommended to upgrade to the new version as soon as possible.

All the more reason to upgrade for .Net developers working with TeamCity is the fact that this release comes with the support for MS Build Tools 2013 in the MSBuild and VS Solution runners. As for test runners, the NUnit runner now works with framework version 2.6.3. .Net code coverage is further enhanced with the bundled JetBrains dotCover 2.5.

Support for Visual Studio 2013 in TeamCity VS Addin and .NET Inspections runner is not yet here, but we plan to provide it in the nearest future. Please watch for these issues:
TW-31731 and TW-33398.

For the complete list of fixes, refer to the Release Notes and download the new build now!

Happy building!

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

TeamCity Torrent Plugin

Today we have some interesting news for you – the Torrent plugin for TeamCity!

With this plugin, users and build agents can download TeamCity build artifacts faster, especially in a distributed environment.

A bit of the BitTorrent protocol details

For those of you who are not familiar with BitTorrent – this is a peer-to-peer protocol. It means there is no single server for shared files. Instead, the files can be downloaded from peers that already have these files or parts of them.

Still, a server is required to find peers. This server is called a torrent tracker. To download a file, a peer must have a torrent file describing the required file. With this torrent file, the peer goes to the torrent tracker, and the tracker provides addresses of other peers in the network sharing the file.

A peer that does not have the file yet but wants to download it is called a leech. A peer that has the file and wants to share it is called a seeder.

Applying it to TeamCity

So what TeamCity Torrent plugin does – it turns TeamCity into a torrent tracker for all published artifacts greater than the specific size: by default, the artifacts of size less than 10 megabytes are not available via the BitTorrent protocol as it is not very efficient for small files. Additionally, the TeamCity server becomes a seeder for these artifacts. So for every artifact there is always one seeder in the network.

On top of that, when an agent decides to download an artifact dependency, it can choose to use the BitTorrent protocol instead of HTTP if there is more than one seeder available. Once the agent downloads the file, the agent itself automatically becomes a seeder for this file. When the agent publishes the artifact to the TeamCity server, both the server and agent start seeding it. So if you use TeamCity artifacts a lot, eventually you’ll end up with quite a number of agents seeding artifacts. Not only does this increase the speed of the artifacts delivery to agents, but it also reduces the load on the TeamCity server.

Finally, the users who have Torrent clients installed can also download files from TeamCity via the BitTorrent protocol.

Setting up the plugin

The plugin is compatible with version 8.1, so to try it, you need to install the latest TeamCity EAP build. Grab the plugin here and install it as usual.

Once you restart the server, a new link, Torrent Settings, will appear in the Administration area. The plugin is disabled by default. You can enable it on this page:

Verifying the plugin works

If the plugin works correctly and you checked both options on the Torrent settings page, then once a large enough artifact is published, you should see the following icon near the artifact name:

Clicking this icon should start your favorite torrent client. And this is what it looks like for some of the widely used artifacts on our server:

If a build has an artifact dependency on some artifact, you should see the attempts to download the artifact via torrents in the build log:

Please try this plugin and let us know what needs to be improved!
Happy building!

Posted in EAP, Features, FYI, How-To's, News & Events | Tagged , , | 6 Comments

Automatic Merge

Dear DVCS users, TeamCity 8.1 brings you automatic merging! Please give it a try and let us know what you think!

Now you can merge the sources of a build into a specified branch using the automatic merge build feature. It handles the case when you create a branch to fix some issue and push the branch only once when the work is complete and ready to be merged.

Remote runs

Those of you who use remote-runs from IDE know that the great thing about them is that IDE will submit your changes automatically once the build finishes successfully. However, as it happens with every technology, remote runs have some shortcomings.

When you start a remote run, TeamCity applies your patch on top of the latest revision at the time the build starts. So when you decide to submit your changes, the result of the personal build reflects the final state of your repository more closely, which is great! But if your colleague breaks some tests or, God forbid, a compilation while your remote run is waiting in a queue – your build will fail even though you didn’t break anything.

Another shortcoming is that in order to commit personal changes, TeamCity needs your IDE to be open so that the TeamCity plugin can make a commit on your behalf. Besides, personal builds force you to make all the changes in a single commit which is not always convenient.

Automatic merge

With the automatic merge you get the picture similar to remote runs. When a build finishes successfully in your feature branch, the branch is merged automatically to the default.

As with every merge, the automatic merge works best with short-lived branches. The merge itself doesn’t care about the age of your branch, but the older your branch is, the higher the probability of failure due to conflicts is. Actually, not only files can be moved around, but also semantics can change over time. Things get worse when you, for example, extend some java class while your colleague removed it in the default branch. The merge succeeds but your compiler won’t be happy with the result.

Still, comparing to remote runs, the automatic merge can get you the best of 2 worlds: the isolation of feature branches and the ability to integrate your changes automatically. As a bonus, you can finally turn off your computer when you go home – the merge is performed on the server, so no open IDE is required.

Configuring automatic merge

First, configure feature branches. Then add the Automatic Merge build feature to your build configuration. Specify a pattern for branches to merge, e.g. ‘+:issue-*’; a destination branch, e.g. ‘master’; and a merge commit message to use. By default, the merge is performed only for green builds, but you can also choose to run a merge if no new tests failed. If there are any conflicts during a merge, TeamCity fails the build.

You can specify the merge commit author in VCS root settings:

What if you want to merge only when several conditions are met? For example, do the merge only when tests on Linux, Windows and Mac OS pass. You can achieve that using snapshot dependencies:

  • create a build configuration with a VCS root to merge and configure the auto merge build feature
  • add a snapshot dependency to every build you want to succeed before a merge occurs.

As a result, the merge at the top of the chain will be performed only if all builds in its snapshot dependencies were successful.

Double-distilled merge

To handle semantic conflicts, like the use of a removed class, you can create a separate ‘integration’ branch and use it as a destination for an automatic merge, and then configure another merge from the ‘integration’ to the default branch. The integration branch will sometimes be red due to uncoordinated changes in the parallel branches but the default branch will always be green and safe to deploy*.

Manual merge

The asterisk in the previous sentence means it was a lie . The automatic merge cannot guarantee green builds. If you run your build on multiple platforms or there is a lot of concurrency in your system, some tests may fail even if the previous build on the same revision was green.

So you have a build where some tests failed, but you know that the build is fine and its sources should be merged. To deal with such cases, you can merge the build sources manually. We added the Merge this build sources action on the Changes tab of a build. It allows you to choose a destination branch and do the merge. A manual merge is also useful if the push-only-when-complete workflow isn’t suitable for you, so you can merge the branch when it is ready from the TeamCity UI.

Posted in Features | 3 Comments