Having one build configuration use artificats from two different buildConfigs

Hi,

Background:
I have a large number of projects which basically have two ways to compile:
1) By using dependencies checked in SVN
2) By using dependencies from another buildConfig of another project(s).

After compilation, the output of this compilation is tested using the same test script (nunit and fit).

Problem:
Although the test scripts are same and use the output of the preceding buildConfig - I am having to create two test configs to set the right dependencies e.g., TestConfig1 uses CompilConfig1 outputs, and TestConfig2 (same as TestConfig1) but uses output of CompileConfig2.
Is there a way where I can use the same TestConfig but use output of either compileConfig1 or compileConfig2 based on some flag etc. The intention is to reduce the maintenance on the number of test configs I have to maintain.

Thanks.

6 comments
Comment actions Permalink

Hi,

To simplify the setup you can use Templates. We have the related feature request https://youtrack.jetbrains.com/issue/TW-16426, please see and vote for it. Also you can try suggested workarounds.

0
Comment actions Permalink

(Followup question)
Thank you. I am going to use templates and REST API to get the artifacts (with a flag in the build script to get the artifacts from the right location).

Followup question:
When I was looking at the REST API, I could not find a way to get a dependency from the same build chain. Could you pl. provide an example of this as I could not find this in the documentation.

0
Comment actions Permalink

Hi,

If you use templates and create as many Test build configuration as Compile, then you can create Artifact/Snapshot Dependencies manually from UI. (the recommended approach)

If you want to have one build configuration and use REST API, then you can for example configure finish build trigger for Test configuration. From triggeredBy parameter you can get the number of the Compile build and download its artifacts. Also you can get the change id of the Compile build and trigger Test build on a specified change, for more details read about Triggering Builds.

0
Comment actions Permalink

Thank you. You have been very helpful. Is there a way to get telephone support (paid if required) to get us up and going in an optimal fashion. Thanks. I have read both the teamcity books available but unfortunately they covery only the trivial cases.

0
Comment actions Permalink

When I print the value of the triggeredBy parameter, I see a text of the following format “ProjectName :: ConfigName”. How do I get the buildID which triggered my build from this field as I can have many builds under this project::configuration? Thanks.

0
Comment actions Permalink

Hi,

Sorry for delay.
%teamcity.build.triggeredBy% equals to HelloWorld :: A, build #163. Please use quotes to print it. Also you can check all build parameters and their values on Build's Parameters page.
Regarding support: We do not provide regular phone support. While as a temporary experiment, we have a direct access phone line. Please read more about Feedback.

0

Please sign in to leave a comment.