I'm trying to create teamcity build pipeline for release/* branch.I created VCS root with hardcoded value for release e.g. Default branch: refs/heads/release/1.0.0 but this is hard-coded and for each release I need to manually change the release number. Is there any way to set Default branch and Branch specification: which checks for latest release/* branch and run the build?
0
votes
1 Answers
0
votes
you can specify the branch to be build in branch specification
buildAndTestConfig.triggers {
vcs {
branchFilter = """
+:*
""".trimIndent()
groupCheckinsByCommitter = true
triggerRules = "+:release/base/*"
}
}
but a better method would be to refs/heads/release as the base branch and for each change in build number the build counter to create a folder and copy the results using the buildcounter.So you would have a base branch,when first time project is build,a new folder will be created with the build number,use that folder to copy the results .