TeamCity GitHub Snapshot Dependence

I have a TeamCity 7.1 project with several configurations.

The MyBuild configuration creates a project for a VCS root directed to a GitHub repo with multiple branches and has the specification Branch = +:refs/heads/*

The MyDeploy configuration deploys the package created by MyBuild and has a snapshot dependency on MyBuild.

I find that "MyDeploy" will always run "MyBuild" for the main branch - even if there is a newer build for some other branch.

Can I configure MyDeploy to: (1) deploy the last successful build for a particular branch, or (2) deploy the last successful build for any branch?

+4
source share
2 answers

It looks like you can't do this.

From Team City Docs :

If there are dependencies of snapshots on other configurations of the assembly in the assembly configuration with branches, when the assembly is started in the branch, all assemblies from the chain will also be marked with this branch.

Currently, it is not possible to configure artifact dependencies to retrieve artifacts from an assembly from a specific branch, artifact dependencies always use assemblies from the default branch. The same goes for the build completion trigger. It will only look at ready-made assemblies from the default branch.

+2
source

I ran into the same problem. There are two workarounds I've found:

  • Define a specific “MyBuild” manually before running MyDeploy
  • Uncheck the "Do not start a new assembly if it is suitable" checkbox in the configuration dependencies. I did not like this approach because it launches the new assembly "MyBuild".
0
source

Source: https://habr.com/ru/post/1479090/


All Articles