views:

155

answers:

2

We're trying to define a TeamCity project for a release tag. When we're ready to release, we tag trunk with a tag that includes the version number. We want the build process to checkout based on this tag and when the build is complete, move the files into a folder with a name that is also based on the version number.

We're only interested in having a "latest version" project, so each time we move to a new version, we will reconfigure the existing TC project with the new version number.

The problem I'm having is in parameterising the VCS root url (SVN). I know how to set up variables for the build that can be used in the build processes, which we could use to configure the folder we move the files to. However, I can't seem to find a way to create a variable that we can reference in the SVN url.

Is there a way to derive VCS urls from variables? Is it possible to have one variable shared between the VCS root and the project configuration?

A: 

I'm not sure I completely understand what you are asking for, so I will try to answer this point by point:

Q: "We want the build process to checkout based on this tag and when the build is complete, move the files into a folder with a name that is also based on the version number."

A: If you are trying to dynamically change the vcs root then I don't believe this is possible.

Q: "he problem I'm having is in parameterising the VCS root url (SVN)"

A: Here are some variables that might help:

%dep.btXX.vcsroot.{svn_branch}.client-mapping% - this will show what the vcs root views. You just need to set the correct project code. %dep.btXX.env.BUILD_VCS_NUMBER% - VCS revision number of the first VCS root attached to the build configuration.

I hope this helps.. But it does sound like you have an overcomplicated setup. If you bullet the steps for me, I might be able to give you a better answer.