1
votes

In teamcity I have separate configurations for building, deploying and testing a project. we would like to chain them together.Basically the 'build' configuration does a build triggered by version control check-in and 'deployment' configuration deploys the required project files on to the integration server and 'test' configuration runs automated tests on the integration server deployed files.

The source code is checked out only when the 'build' configuration is run and I want to use the code checked out by this configuration in the 'deployment' configuration and once this deploys the files into a particular directory, I want to run the 'test' configuration against these deployed files. To achieve this I hardcoded the paths in 'deployment','test' configuration settings in teamcity currently.

But when we chain them I want the 'deployment','test' configurations to automatically get the path to the checked out code and the path to the deployed files respectively.

I am not sure if this can be done using teamcity artifacts.Even if it is not sure how to configure it.

Could someone please help.

Thanks

1

1 Answers

2
votes

The "Build" configuration should publish the source code files and the binaries that it compiles as artifacts. Then you can set up dependencies in the "Deployment" and "Testing" configurations that retrieve these artifacts. That way you should not need to hard-code the path to the source code files.

One additional thing to think about is build parameters which you can probably use to avoid hard-coding the path to the wherever the binaries are deployed.

Here are some links to some useful pages in the TeamCity documentation.

Artifacts

Artifact Dependencies

Build Parameters