I have a single project with three build configurations:
Build configs 2 and 3 are dependent on 1 via a snapshot.
There are 3 VCS roots:
The default branch and branch specs are as follows:
Git - All
default branch:
develop
branch spec:
+:refs/heads/(develop)
+:refs/heads/(master)
+:refs/heads/(feature/)
+:refs/heads/(hotfix/)
+:refs/heads/(release)
+:refs/heads/(support/*)
Git - Develop
default branch:
develop
branch spec:
+:refs/heads/(develop)
Git - Master
default branch:
master
branch spec:
+:refs/heads/(master)
Here is the problem...
When I run a build for the third build config, I want the dependency to check for integration builds on the master branch. It is not doing and will always use the default branch of the integration build config (currently develop).
Is there a way to achieve what I want?
The way I have done it in the past involved using multiple CVS end points on a single build config, which also seems wrong and I wanted to avoid that if possible.
To run builds from a specific branch or set of branches automatically, configure build triggers. You can also filter history by a branch name if you're interested in a particular branch. TeamCity assigns a branch label to the builds from the default branch too.
Last modified: 28 September 2022. This section contains articles on how to create and configure build configurations via the TeamCity UI. A build configuration is a collection of settings used to start a build and group the sequence of the builds in the UI.
To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.
To add your first project, click Administration in the upper right corner of the TeamCity UI and then click Create project. There are several ways to create a project in TeamCity: automatically from a repository URL, from a connection to a specific VCS, or manually.
I would suggest using a variable for branch spec and VCS trigger. That allows you to reuse the VCS root, while still giving you the flexibility to choose the values in each build configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With