开发者

teamcity ant multuple project build

开发者 https://www.devze.com 2023-02-11 02:37 出处:网络
I hope you guys can help me. my problem is the following: i have 2 projects that depend on each other each of them in different svn root.

I hope you guys can help me. my problem is the following: i have 2 projects that depend on each other each of them in different svn root. what i do toady is build the first , take its artifact and copy it manually to where ever i want in second project and than run the second build. i want to be able to run 1 build it can be either with a new ant build.xml file who will run the first build , copy its product to where ever i want it and than will run the second build.

second option run those 2 project with dependency in teamcity. i'm not sure how to 开发者_如何学编程do so and how to pass the first project artifact to be placed in the right folder i need it in the second project.

maybe someone know's how to do that.

thanks.


TeamCity's Artifact Dependencies seems to be the best option.
Suppose you have ProjectA and ProjectB:

  1. Configure TeamCity to publish files from ProjectA:

    • Open General Settings configuration step of ProjectA.
    • Fill in Artifact paths field with relative paths to published files. TeamCity will collect these files after build finishes.
    • Build ProjectA to make sure artifacts are collected properly. Artifacts must become available on build results page (see Artifacts tab).
    • See documentation for artifacts for more details

  2. Configure Artifact dependency for ProjectB:

    • Open Dependencies configuration step of ProjectB, add new artifact dependency
    • Depend on - select ProjectA
    • Get artifacts from: - use whatever you need. Possibly, last successful build.
    • Artifacts - enter artifacts paths from ProjectA. You can use popup to choose artifacts with UI.
    • Destination path - enter destination path, where artifacts will be copied to. Path is relative to checkout directory
    • See documentation for artifact dependencies for more details

Now each time you start build for ProjectB, it will download artifacts from last successful build of ProjectA.
If you want these builds to start simultaneously, add Snapshot dependency (on ProjectA) to ProjectB. With snapshot dependency, each time you start ProjectB, it will first trigger ProjectA, wait for ProjectA build to finish and (if has artifact dependency on "last successful build" of ProjectA) download fresh artifacts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号