Configuraton Question (Perforce)

Hi all,

I am new to Team City and have this following question:

Currently I am using Perforce as VCS in TeamCity and here is my scenario:

I have one very big root project --let say they are located at "//depot/MainRoot/..." in Perforce.
Inside that root, I only want to monitor update changes from two location only, let say "//depot/MainRoot/ProjectA/..." and "//depot/MainRoot/ProjectH/..." out of all Project over there.

But, both of ProjectA and ProjectH still need others files in the MainRoot (for example: "//depot/MainRoot/ProjectB/...") to be compiled.

Hence, I will need all files from "//depot/MainRoot/..." available, but I only want TeamCity to run whenever there is changes in ProjectA and ProjectH.

How do I need to configure that?
Currently I am put "C:\MainRoot" as checkout directory and depot as the main root (in P4 Connection Settings, I just assigned "Client" to be team-city-agent).

But that configuration, will trigger TeamCity to run for any changes made in depot (even sometimes it clean up and do sync force which takes a lot of time).
do I need to add trigger rules? what parameter should i put there?
what other changes do i need to do? (especially to negate any clean up)

Thanks and happy coding :)

3 comments
Comment actions Permalink

Hi Andrian

There are two parts of the process.
At Version Control Settings page of a build configuration you can specify what sources to checkout. If required you can attach multiple roots, and filter and remap directories using checkout rules.
TeamCity monitors changes in these paths and collects "pending changes".
But a build is not started automatically. There is Build Triggering page where start rules are set. VCS trigger allows to run build when new pending changes are detected. By default it happens after every change, but you can add filters in trigger rules.

Checkout directory option is used when build scripts contain hardcoded filepaths, and can be started from specific directory only. In all other cases we recommend to left it blank.

Michael

0
Comment actions Permalink

Hi Michael!

Thanks for replying!

I still have one question about these:

If I use checkout rules, let say I put: "//depot/MainRoot/ProjectA/..." and "//depot/MainRoot/ProjectH/..."
then later when I run TeamCity, which one is being sync? Will all MainRoot project being sync-ed or only ProjectA and ProjectH?


Thanks for the build triggering explanation! With that I can do triggering only for ProjectA and ProjectH.

0
Comment actions Permalink

Hello Andrean,

  Could you please be slightly more verbose about your setup - what task are you going to solve and which settings to use?
  I'm asking both about checkout rules and about Perforce client mapping, because both should be considered.

  Regards,
  KIR

0

Please sign in to leave a comment.