jameshartig / teamcity-vcsupdate-plugin

Call a URL in TeamCity to force it to check for VCS updates. Used to run a TeamCity build immediately after a VCS commit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

VCSUpdate is a simple plugin for the TeamCity continuous integration server that allows for an efficient and flexible method of triggering new builds. Rather than poll the version control system (VCS) constantly, you can simply call a URL on the build server to kick off a check for new sources.

You can configure your VCS (such as Subversion) to request the URL on your build server whenever a developer commits a change. Typically, this would be done with a post-commit hook and a tool such as wget or curl.

Aside from the obvious benefit of reducing the load on your VCS (by eliminating constant checks for updates), VCSUpdate actually allows your build server to be more responsive, since it can be notified immediately whenever the code changes.

Credits

This project is a fork of the vcsupdate plugin created by Jon Vincent for TeamCity 7 support. The original project is hosted at http://code.google.com/p/vcsupdate/

Then the project was forked by James Hartig to add TeamCity 8 support and a password. To use the password, you must edit config/build-server-plugin-vcsupdate.xml and build the project using maven. It is built with an empty password by default.

Note that this plugin will be obsolete when http://youtrack.jetbrains.com/issue/TW-23077 is completed.

How to use vcsupdate

Once you have the plugin installed on your TeamCity server, simply configure your VCS server to request the vcsupdate.html page, and add parameters for each of the VCS roots that should be queried for changes. For example:

http://my.build.server/vcsupdate.html?id=myvcsid

In the example above, you would replace "my.build.server" with the URL of your TeamCity build server, and you would replace "myvcsid" with the id of the VCS root that you've configured in TeamCity. You can specify as many "id" parameters as you would like, separated by the '&' character.

In addition to root IDs you can send build IDs with the "build" parameter. If you do not pass the "build" parameter then it will mark all builds for a VCS update. You can specify as many "build" parameters as you would like, separated by the '&' character.

If you're building the plugin yourself and specified a password, you can send it with the "pass" parameter.

How to install vcsupdate

Simply drop the vcsupdate-2.1-teamcity-plugin.zip file into the plugins/ subdirectory of your TeamCity data directory (.BuildServer/plugins), and restart TeamCity. Delete any existing vcsupdate*.zip files first.

Once you've installed VCSUpdate, you'll probably want to change your TeamCity server configuration, and set the default VCS polling interval to something much larger (a reasonable value is 43200 to check twice a day).

How to build vcsupdate

If you'd prefer to build VCSUpdate yourself, you'll need Maven 2.0.6 or higher. Just checkout the sources from googlecode, and run mvn assembly:assembly. That will build the project and put the vcsupdate.zip file in the the target/ subdirectory. You can then copy it to your TeamCity plugins/ directory.

About

Call a URL in TeamCity to force it to check for VCS updates. Used to run a TeamCity build immediately after a VCS commit.

License:Other


Languages

Language:Java 100.0%