Triggering dependent configurations

Let me explain the scenario:
I have a set of build configurations, B1...BN that build from VCS sources. These build configurations are based on the same template.
The configurations build using VCS triggers, it works fine.

I want to sometimes do a build of all the B1...BN builds and bundle them into one package. In addition, when I build for this package:
1) some shared configuration variables for this specific package should be used.
2) the same VCS source revision must be used.

From what I understand, for #1 the way I can access shared variables, would be by making the template of the build configurations take a snapshot dependency on some build configuration C, in which the variables are configured.
This way, I can access them from the template using %dep.C.var%.
Also, I can set up the specific revision of the sources to use in C, which should propagate due to snapshot dependencies

I want for build configurations B1...BN to trigger when I run the configuration C. This way, the package should be created. All of the B configurations must use the same "instance" of C, so they use the same variables and VCS revision
I can make this work, by manually triggering all the B's and setting the snapshot dependency manually for each of those. However, since N is ~20, this is a lot of work.

Now, I want the building of B to be automatic, when I run the configuration C. However, triggering C will not trigger any B automatically (since the dependency is the wrong way for that). But I cannot reverse the dependency, because I then cannot access %dep.C.var% anymore.

What is the correct solution to this problem?

I have tried the "Trigger on changes in snapshot dependencies" in the template of B, but this doesn't seem to work, even if I add a "dummy" artifact in C and then consume it in B.
The "Trigger on finished build" works if I set up C to use the latest revision, but as soon as I want to build a package of an "older" revision, the C is considered history and none of the B will trigger.

Is there another way to make this work?

I'm considering trying to create a build configuration D, that depends on B1...BN as well as C, and running that manually after setting up an instance of C, and hoping that snapshot dependencies will make B1...BN pick the correct instance (and variable values) of C. Would that work?

1 comment
Comment actions Permalink

Just noticed, there's also the issue that since I'm changing configuration parameters, it seems to no longer be possible to do snapshot dependencies on C, it just picks latest revision when building a B anyway.

Is there ANY way to supply configuration parameters to a build-chain, and make it run all the configurations in the chain?

0

Please sign in to leave a comment.