enable/disable dependencies on specific branches

Answered

Is it possible to enable or disable snapshot and artifact dependencies on a specific branch by using Kotlin DSL?

Scenario 1:

On one branch build A needs an artifact from build B: So A has the artifact an snapshot dependency for build B. Also they need to be on the same branch.

And if B fails, A will be canceled. 

B needs some artifacts from C,  so B has the artifact an snapshot dependency for build C

(A -> B -> C)

Scenario 2:

In a different branch build B isn't possible to be run yet and A doesn't need B, but C. So when build A starts, it fails due to the artifact dependency on B.

(A -> C)

Now i'm looking for a way to set a branch filter for the dependencies or disable them on B for that specific branch.

Anyone has an idea or workaround for this?

Thanks in advance

 

  

0
1 comment

Hello!

I believe TeamCity does not allow to modify the logic around dependencies basing on the branch in use; maybe having two configurations, one per branch-specific behavior, could work for you? You could keep the common build steps the configurations have either defined on the template (https://www.jetbrains.com/help/teamcity/build-configuration-template.html), or create a meta-runner out of the configuration (https://www.jetbrains.com/help/teamcity/working-with-meta-runner.html) which could be reused on the other configurations.

Please let me know for any questions or concerns and I will gladly assist.

0

Please sign in to leave a comment.