Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

subversion release management with TeamCity

We currently use Subversion for our release management, and tag all of our releases (both to QA and to our production servers). However, we'd like to create a single Release directory reflecting our newest release instead. This way we can have TeamCity always pull from the same folder for continuous builds. Also, if someone has to make a quick bug fix to production, they won't accidentally make it to the wrong branch.

For example, below is our current structure with a 'release' folder added. Would there be an easy way to move a tagged branch to 'release' each time, or even have 'release' be a link to the newest release_* version?

Our subversion folder structure

Clarification

Here's an example of how our build/release process currently works:

  • Today, I release a version of our web app to QA after TeamCity successfully builds it. When doing so, I branch/tag it
  • Tomorrow onward, devs continue making updates in the trunk. These will not be pushed to QA until the next QA release
  • On Wednesday, our QA team notifies us that they've found a bug. We make a bug fix on the QA branch, merge the change back to the trunk, and push the updated QA branch back to QA. ISSUE #1: TeamCity is no longer working for us since we're in a #'d QA branch
  • On Friday, QA approves the release for production, so we publish and branch/tag
  • On Monday, a client calls with an issue requiring a small change to production. We make the change in the release branch and merge back to the trunk. ISSUE #2: Once again, we're making a change without TeamCity helping us
like image 610
Beep beep Avatar asked Jul 15 '11 21:07

Beep beep


People also ask

Do I need a Subversion client to install on TeamCity?

You do not need a Subversion client to be installed on the TeamCity server or agents. TeamCity bundles the Java implementation of an SVN client ( SVNKit ). Specify the SVN URL that points to the project sources. Specify the SVN username. Specify the SVN password.

How does the TeamCity Artifactory plugin manage a release?

The TeamCity Artifactory Plugin manages a release with Maven running the build only once using the following basic steps: Change the POM versions to the release version (before the build starts). Trigger the Maven build (with optionally different goals). Commit/push changes to the tag (Subversion) or the release branch (Git).

Does TeamCity Artifactory support Maven and Gradle release management?

… The TeamCity Artifactory Plugin includes release management capabilities for Maven and Gradle runners that use Subversion, Git or Perforce for version control. When you run your builds using Maven or Gradle with jobs that use Subversion, Git or Perforce as your version control system, you can manually stage a release build allowing you to:

When does TeamCity run the SVN revert command?

If the option is selected, then TeamCity always runs the svn revert command before updating sources; that is, it will revert all changes in versioned files located in the checkout directory. When the option is disabled and local modifications are detected during the update process, TeamCity runs the svn revert after the update.


1 Answers

I would (and do) take a slightly different approach to this. Source control management is primarily for, well, managing source and treating it as a means of tracking or implying releases can make life a little tricky. This is really the purpose of your continuous integration environment and it does a far better job of it than what SVN does.

I use TeamCity as the means of identifying both path and revision number to pull from SVN. It's easy enough to define this at build runtime and any release to production is always done with caution (i.e. carefully check both path and revision). In the absolute worst case, if you do screw it up, you can always re-run the build with revised parameters.

You really don't want to end up making code changes directly to a "Releases" folder - this is what the trunk is for if it's mainstream development or branches are for if you've had to adjust an earlier revision. It's sort of beating SVN into submission to do something that's not its core strength! On that front, you might find some of the tips in The 10 commandments of good source control management useful.

like image 128
Troy Hunt Avatar answered Oct 23 '22 21:10

Troy Hunt