DarrenW
DarrenW

Reputation: 11

Setting TeamCity agent.work.dir from Custom Build

I'm setting the teamcity.build.checkoutDir configuration parameter via the 'Run Custom Build' dialog as I want to control the build location.

When looking at the 'Build Parameters' page of the build, I can see the teamcity.build.checkoutDir parameter is correctly using my set value, but the 'Actual Parameters on Agent' value always remains set to the default checkout path.

I've tried setting the Version Control Settings->Checkout Directory to Custom Path and the teamcity.build.checkoutDir parameter still does not use my custom setting.

Please can someone help me with this?

Many Thanks!

Upvotes: 1

Views: 2181

Answers (1)

Brynn McCullagh
Brynn McCullagh

Reputation: 4143

You can't change the value of teamcity.build.checkoutDir. All the teamcity.build.* variables are read-only.

You can change the checkout directory by editing the VCS root settings.

  1. Edit the build configuration
  2. Select Version Control Settings
  3. Next to Checkout Directory choose 'Custom Path' from the drop-down.

Custom Checkout Directory

You can also set a custom path by using custom client mappings for the VCS.

Upvotes: 2

Related Questions