Posts Tagged ‘TeamCity’

Setting up TeamCity as a native NuGet Server

Thursday, December 1st, 2011

TeamCity 7.0 EAP (Early Access Program) was recently opened and one of the new features is the built-in support for NuGet. I recently blogged about setting up TeamCity to pack and publish NuGet packages via a plug-in and this plug-in is now included by default in TeamCity 7. However, the real new interesting feature is that TeamCity is now a native NuGet repository too!

Native NuGet Server?

Many of those that have been using NuGet, have most likely been using it to consume packages from nuget.org where there are currently over 3800 unique packages, most of which are open source.

image

What happens however if for some reason or another you do not want to submit packages to nuget.org? For instance, think that you want to use NuGet to modularize and distribute code inside your own organization, or create libraries for private consumption. In this case, publishing to nuget.org does not make sense. This leaves you with basically two options:

  1. Setup your own NuGet repository by downloading and installing the code that nuget.org for instance
  2. Copy nuget packages to a local share and have everyone read off of that

Both of these options come with their own share of overhead. With the local share you now require sharing of folders and permissions. Setting up your own NuGet repository also requires managing permissions and whatnot separately. At the end of the day, its another service to manage.

Fortunately, you now have a third option: TeamCity. The same server that builds your projects, runs your tests, packs and publishes your packages can now also serve them. The best part of it is that it is so simple, that I had to take up the rest of this blog with the previous nonsense just to give it some meat.

Enabling TeamCity as a NuGet Server

I am not going to cover how to pack and publish packages in this post. All that is covered in detail in the previous post I wrote, so please read that first if you’re not familiar with the process. Enabling TeamCity as NuGet and making packages available consists of two steps:

1. Enable the server to be a NuGet server

Go to Administration | Server Configuration | NuGet tab

image

Click on the Enable button to enable it. The same screen with then display two different feeds: a public and a private one:

image

If by chance the Public Url is not available, you will probably see a message telling you that you need to enable the Guest account in TeamCity, which can be done from the General tab.

2. Make your packages be your Artifacts

Since TeamCity itself is going to be a NuGet server, the step to publish a package is no longer required. However, packing the package is. In this step (NuGet Pack Build Type), we can just configure the output for the package to point to some specific folder, for instance packages

image

We need instruct TeamCity to ouput the results of this folder as artifacts. This is done in the General Settings step of the Build Configuration

image

and with that, we’re done. Next up is to configure Visual Studio to consume from this feed.

Configuring Visual Studio

Although this step is optional, it is recommended to add your repositories to Visual Studio to avoid having to type long URL’s in each time you want to read from a specific package repository. To do this, click on Options | Library Package Manager | Package Manager Settings

image

We need to add a new NuGet Repository. I’ve called it Local TeamCity and the URL corresponds to the public URL provided to me by TeamCity in Step 1:

image

Notice that I have another entry which is Local TeamCity Auth which corresponds to the authenticated version.

Once we have this, we can now easily consume packages from our repository by merely specifying it in the Package Manager Console, either via the Combobox or explicitly in each call:

image

Summary

That’s all there is to it. By merely publishing our packages as artifacts, TeamCity now provides a full-fledged nuget server which opens up great possibilities when it comes to working and managing dependencies between projects. TeamCity is currently in EAP and much of what I’ve described here is in open to improvements. That is why your feedback is very important. Download 7 and start playing with it today. Let us know what you think.

TeamCity 5.0.3

Tuesday, March 16th, 2010

The fresh update for TeamCity, which comes with a number of bug-fixes in it, is now available.

Check the release notes for the complete list of included changes and download the build.

As usual, we recommend backing up your TeamCity data before upgrading to a new version.
Stay tuned and try TeamCity 5.1 EAP.

Feedback is always welcomed!
Sincerely,
JetBrains TeamCity team.

Tags in TeamCity

Tuesday, March 9th, 2010

As you might know, TeamCity comes with such feature as build tags – do not confuse with supported VCS tags, because that’s an entirely different story. You can assign any number of tags for a single build, and then use them to organize your build history, or quickly navigate to the tagged builds. There is nothing tricky about that, but one might ask himself when these tags can be helpful.

Well, here is an example. Suppose, after some time of developing, your project manager decides, that you’ve finally got a stable build that can be considered a release candidate, or eap. He can mark this build with “EAP” tag, and thus, guys from QA won’t need to search through the whole build history to find the build they should carefully look at. They’ll just need to filter the history by this tag, or simply type “EAP” in the search field.


You can also leave a comment on any build, providing some extra notes about it; and just as with the tags, you can later on search for the build by the comment. Hope, you’ll like it.
Feedback is appreciated as usual.

Opening TeamCity 5.1 EAP

Thursday, February 25th, 2010

We are glad to announce, that we’ve just opened an Early Access Program for TeamCity 5.1.

Here’s the short list of only some of the improvements and features that today’s EAP brings:

  • Customizable email notifications — now you can use FreeMarker templates to create your custom notification messages.
  • Several UI improvements, such as collapsible projects on overview page and the most voted one — the ability to specify time zone, which is handy for geographically dispersed teams.
  • New Current problems tab is added for a project, that shows which tests are currently failing in this project and which configurations are red.
  • Support for .NET 4.0, and not yet released Visual Studio 2010 and TFS 2010.
  • Improved support for .NET test frameworks.
  • Code coverage support for Maven runner.
  • Ability to produce zip and tar.gz artifacts from a bunch of files.
  • IDE integration plugins improved.
  • read more…


View the detailed release notes, download the build and stay tuned — TeamCity 5.1 won’t take long to appear.

By tradition, we remind you to back up your data before upgrade.

Looking forward to your feedback!

Sincerely,
JetBrains TeamCity team.