•  
  • Showing issue #4 of 442 found
  •  
Back to Search
 
Priority
Major
Type
Feature 
State
Open 
Assignee
Pavel Sher 
Subsystem
Server 
Affected versions
Fix for
  • Submitted by   Kirill Maximov
    2 years ago (18 Jul 2008 13:13)
  • Updated by   Yegor Yarko
    2 days and 20 hours ago (29 Jul 2010 15:37)
TW-5428 Support variables in VCS roots, dynamic VCS roots
39
See discussion at http://www.intellij.net/forums/thread.jspa?threadID=275211

Base request from there:

We branch a lot. We only need to build a branch 2-3 times then we merge it into the trunk (which was want an a scheduled build). We would LOVE to not have to create a new project and VCS to build each branch.

Is there a way to prompt for a variable that could be used to name a build and to put a value into the VCS checkout?

EXAMPLE:
We want one project called: Branch-Build
When clicking run we want it to ask: Which Branch? $branchname$
VCS Root looks like this: svn://domain/rootproject/branches/$branchname$
Add a tag to the build of: $branchname$

EXTRA:
Show tags of builds in the overview.html

PS:
We love TeamCity so far. It will save us so much time once it is implemented. We are trying to talk our manager into getting enterprise just to help support you guys.

Edited by: Kjuib on May 13, 2008 6:32 PM
Comments (28)
 
History
 
Linked Issues (17)
 
Yegor Yarko
  Yegor Yarko
18 Jul 2008 16:51
(2 years ago)
This is only possible if no changes are displayed for such builds.
Jeff Brown
  Jeff Brown
18 Jul 2008 18:12
(2 years ago)
We would use this as well to allow QA and Production builds based on a given tag from a previous build. For example, the user would supply the build# they wished to use for the QA release.
Yegor Yarko
  Yegor Yarko
12 Mar 2009 14:15
(16 months ago)
Probably related request (trigger a build on new tag creation): http://jetbrains.net/devnet/thread/280399
Yegor Yarko
  Yegor Yarko
09 Apr 2009 22:26
(15 months ago)
A related post about a new build configuration per git branch: http://www.jetbrains.net/devnet/message/5235473
Arunkumar
  Arunkumar
16 Apr 2009 12:58
(15 months ago)
I am new to the world of Teamcity, but know its great and wanting stuff.

Currently we r having 3 build configurations for a project.
1. Development Build Configuartion -
(would be used only by developers,to check emma, Junits, test cases, etc but would not label VCS)
It has one VCS root defined which just lets to checkout and thats all.

2. Test Release Build Configuartion -
(would be used by QA guys to perform a build, take a release,and perform a VCS label)
checkout Rules are +:trunk
VCS Labellng Rules are +:trunk=>tags
VCS labelling pattern PRJ_V_%minor%.%major%.%ReleaseComp%.%Build.uniqueNumber%
Remember that minor, major, ReleaseComp, Build.uniqueNumber, etc all are custom properties added to build conf.
and would be provided during "custom Build"

3. Deployment Release Build Configuartion -
(would be used for build a final release which could be handled to the client, an perform a VCS Label)
checkout Rules are +:trunk
VCS Labellng Rules are +:tags=>tags
VCS labelling pattern PRJ_V_%minor%.%major%.%ReleaseComp%.
Remember that minor, major, ReleaseComp, Build.uniqueNumber, etc all are custom properties added to build conf.
and would be provided during "custom Build".
Remember that Build.uniqueNumber is not present here.

Both 2 & 3 Build Configurations use a shared VCS Root, this VCS root is different from the VCS root used by 1st Build conf.

Problem is that
while performing a build for 3rd i.e deployment Release Build conf. we need to checkout from say PRJ_V_1.2.3.4 tag
but the values 1,2,3,4 are taken from user and needs to be passed to the checkout rules.
Is this possible?
if yes how else if no then is there any hope that it would be implemented in the future releases.

Thanks.
Sergey
  Sergey
21 Apr 2009 18:04
(15 months ago)
This is show stopper for us using TeamCity. It is not convenient to copy build configuration all the time you need to build a new branch.
Yegor Yarko
  Yegor Yarko
04 Aug 2009 13:44
(11 months ago)
See also comments to TW-7309: e.g. requested is ability to trigger builds on new tags appearing
vijay polsani
  vijay polsani
10 Sep 2009 17:54
(10 months ago)
The feature to dynamically pass the tag value at runtime is very critical in the integration to external systems and processing the automatic build for our company.
Scenario:
When a issue is raised in JIRA we are required to automatically pass the BUILD_TAG value into TeamCity and kickstart the build process using HTTP GET. We are successful in the integration butwere not able to configure VCS Roots to take in an environment/system variable that can be passed from external tools via HTTP GET.

I guess the requirement is pretty common and wonder how its not possible with TeamCity. :(
nospamnerd
  nospamnerd
30 Oct 2009 18:10
(9 months ago)
<Comment was deleted>
Pavel Sher
  Pavel Sher
22 Jan 2010 00:23
(6 months ago)
Note that in TeamCity 5.0 you can use templates and parameters in checkout rules, see more on this here: http://www.jetbrains.net/confluence/display/TCD5/Build+Configuration+Template
Leif Hanack
  Leif Hanack
25 Jan 2010 11:27
(6 months ago)
@Pavel: your link says: "Currently, re-definition is not available for the following settings: VCS roots..." so this is still a needed feature that is currently missing!
Pavel Sher
  Pavel Sher
25 Jan 2010 12:08
(6 months ago)
Indeed, VCS roots can't be redefined, but checkout rules - can. A short example, you can have VCS root for the whole repository which rarely changes, but with help of checkout rules you can checkout the corresponding part of the repository to .:
+:project/trunk => .
and checkout rules can contain parameters, thus in many cases you can parametrize how checkout is performed.
Leif Hanack
  Leif Hanack
27 Jan 2010 21:29
(6 months ago)
Ah ok, great. This will solve at least the problem sharing configs for feature branches. Thanks for clarification.
James Summerton
  James Summerton
28 Jan 2010 03:05
(6 months ago)
How would this work with Git as source control?
John Hurst
  John Hurst
05 Feb 2010 04:52
(5 months ago)
For anyone interested, I tried to blog about how to set up release builds on different branches using TeamCity Build Configuration Templates and Configuration Parameters, as mentioned in this thread.

http://skepticalhumorist.blogspot.com/2010/02/release-builds-with-teamcity-selecting.html

Great solution by the way. Good job TeamCity team!
Kirill Maximov
  Kirill Maximov
05 Feb 2010 08:52
(5 months ago)
@John, Thanks a lot for the blog post - really good one and to the point!
@James - unfortunately, the existing solution with templates woudn't work for Git yet :(
Edward Serebrinskiy
  Edward Serebrinskiy
16 Feb 2010 09:16
(5 months ago)
With this solution if apply perforce label will TeamCity apply label on entire root or only on selected branch?
Gilles Philippart
  Gilles Philippart
29 Mar 2010 16:45
(4 months ago)
It would be nice if the configuration parameter could also be defined project-wide and so it would be possible to use them in VCS roots attached to project (non shared VCS root in this case obviously).
GT
  GT
20 May 2010 21:04
(2 months ago)
We're a new customer and this is something we noticed right away during our implementation. This feature is long overdue.
Yegor Yarko
  Yegor Yarko
23 May 2010 23:17
(2 months ago)
GT,

Please describe your need in detail. What use case do you need to cover and where exactly do you need properties to be supported?
Dave Kap
  Dave Kap
27 May 2010 01:18
(2 months ago)
Yegor asked for my needs in detail.

Essentially, I feel like there is no need to have this separate set of configurations known as "VCS Roots" when there is barely a difference between the repositories and VCS's we use. It's all Mercurial, it's all under the same hg.website.com domain. The only variation on all of our VCS Roots is at $foo and $bar in hg.website.com/$foo/$bar. Seeing as how checkout rules do not work with Mercurial and the URL hg.website.com/ does not look like a repository to TeamCity's eyes, there is no way for us to set up a 1-Root-For-All-Configurations VCS Root.

If I could have just 1 VCS Root that took in the $foo and $bar variable from something that implemented the VCS Root (such as a single configuration's name or an entire project's name) then setting up a task would be a process as simple as Create From Template -> Name Properly. No need to go in and edit which VCS Roots to attach, no need to go into the VCS Root and specify the repo location. Just name the thing properly and we're done. The easier this process is, the less likely a small team of TeamCity experts has to manage things for a large team of devs. Instead we can just write the "2-easy-steps" instructions somewhere and trust our developers to manage their own tasks. As it is, however, TeamCity is too complicated and requires too much time to set up new tasks and we can't expect our developers to take the time to learn it all.

Thus why we need dynamic VCS roots.
nospamnerd
  nospamnerd
10 Jun 2010 23:57
(7 weeks ago)
We use SVN proxies based on location at our company ( we have at least 4 ). Being able to specify the SVN proxy as a property would be a huge help. We could use the proxy closest to the build agent without having to redefine the VCS roots.
nospamnerd
  nospamnerd
11 Jun 2010 00:10
(7 weeks ago)
I also wanted to note that this one is almost a show stopper for us. We basically want to be able to have a configuration label the source and trigger other configurations to build off of that branch.
We really thought that this would work with the checkout rules. If we could just get %BRANCH% to work in the checkout rules that would make TC a million times better.
Hudson and other CI systems have this ability, so this is a big minus for TC compared to them.
David Marshall
  David Marshall
11 Jun 2010 00:18
(7 weeks ago)
What I am finding is that Build Parameters / Configuration parameters are allowed in the checkout rules. If I try to pass a Build Parameter to custom build, however, it uses the original value, rather than the value passed. Having the ability to pass a parameter to a checkout rule would be a huge benefit.
Yegor Yarko
  Yegor Yarko
11 Jun 2010 17:47
(7 weeks ago)
nospamnerd,

proxies:
you can probably define proxy in the default Subversion config (<os app settings directory>\Subversion\servers) and make sure it is used by the root. If you have issues with this, please open a new issue/new forum thread on that.

branches in checkout rules:
As David mentioned, you CAN specify property references in checkout rules (they are supported since 5.0).
Yegor Yarko
  Yegor Yarko
11 Jun 2010 17:49
(7 weeks ago)
David,

Can you please describe what behavior do you expect when you specify parameters that affect checkout rules in the custom run build dialog?
Particularly, what do you want to see in the changes of the build?

Also, please describe the use cases that you need the feature for.
David Marshall
  David Marshall
15 Jun 2010 17:08
(6 weeks ago)
Basically, we create a vcs label at a given time. I have a snapshot dependency for that revision, for which I create a build. (The vcs trigger mentioned above would really be nice here. . . .) We likely go in an do some fixes to the that label (branch) in order to publish it. I would like to be able to pass a target through a custom build, to build that particular branch that was taken as needed. (Through the variable in the checkout rules. . . )

I can see the dilemma with tagging the changes for that build. For my purposes, all the changes to that branch would suffice. I don't think that makes sense in general, however. In reality, the ability to do this outweighs knowing the changes. Simply indicating that the the list of changes is not available would suffice for my needs personally. I can not think of a way reporting the changes correctly otherwise.
GT
  GT
15 Jun 2010 21:38
(6 weeks ago)
Hi Yegor,

I'm asking for the same feature outlined in the initial request.

Here's a simple VCS root example (Perforce).

//depot/Paradigm/%version%/... //team-city-agent/build/%version%/Paradigm/...

I would then define %version% on the Properties and Environment Variables tab.

GT
Yegor Yarko
  Yegor Yarko
26 Jun 2010 18:39
(5 weeks ago)
from the forum:

specify the properties in the custom run build dialog, and:
...
This could be a good way to handle build of temporary branch & it is a nice way to handle patch/fix where only the path in the CVS differ with everything else is identical (why create a new configuration for those ?)