Perforce "Label/changelist to sync" and Team City branches
Answered
When utilizing Label/changelist to sync in a Perforce VCS root, using a parameter %some_changelist%, when this isn't the default value it will cause two new parameters to be created in a build :
teamcity.build.branch = <whatever the explicit value is>
teamcity.build.branch.is_default = false
Are these required parameters, or are they, in this case, just used as visual representation in the UI? If the latter, is there anywhere to avoid these parameters or to overwrite the values in a job itself to represent the default values?
When running a job via "run" on the web UI and you specifiy and change list as the base, the above teamcity.build parameters aren't created.
Please sign in to leave a comment.
Hello Paul,
Apologies for the delayed response here; there is a logic which will implicitly create a branch if non-default parameter value is passed for VCS root properties.
Could you please let me know why the parameters are unwanted in your use case? Is there any logic which depends on the lack of those?
There's no logic that requires the lack of those, from my side, so I'll rephrase my question, when a branch is created, is there some real logic happening on Team City, or is this just used as a parameter for display purposes in Team City web view?
Paul,
In this specific case it is just for the user logic (e.g. you could check if the branch is available in parameters to use that as a condition in the step logic). I would like to note this applies only to this scenario; for example, with Git VCS roots teamcity.build.branch (.is_default) parameters are present at all times and, further on, you may override the branch value to make the build check out another branch.
I hope this helps; please let me know if there is anything else I could assist with.
That's a great explanation and what I was looking for.
Thank you.