TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Perforce

Last modified: 20 April 2023

This page contains descriptions of the fields and options available when setting up VCS roots using Perforce. Common VCS Root properties are described here.

P4 Connection Settings



Case-Insensitivity in Checkout Rules



Checkout On Agent Settings



When the agent-side checkout is used, TeamCity creates a Perforce workspace for each checkout directory/VCS root. These workspaces are automatically created when necessary and are automatically deleted after some idle time. It is possible to customize the name generated by TeamCity: add the teamcity.perforce.workspace.prefix configuration parameter at the Configuring Build Parameters page with the prefix in the value.

Perforce Workspace Parameters



With checkout on agent, TeamCity provides environment variables describing the Perforce workspace created during the checkout process. If several Perforce VCS Roots are used for the checkout, the variables are created for the first VCS root. The variables are:

  • P4USER - same as vcsroot.<VCS root ID>.user parameter

  • P4PORT - same as vcsroot.<VCS root ID>.port parameter

  • P4CLIENT - name of the generated P4 workspace on the agent

These variables can be used to perform custom p4 commands after the checkout.

More information: Perforce Workspace Handling in TeamCity

Perforce Proxy Settings



To allow using Perforce proxy with the agent-side checkout, specify the env.TEAMCITY_P4PORT environment variable on the build agent and the agent will take this value as the P4PORT value.

Other Settings



Perforce Jobs Support



For a changelist which was checked in with one or several associated jobs, TeamCity shows a wrench icon Iim zm cveq f pj c6yw vg ed hlkso9ie7i3i4l6np jme07gx4k i4m6 5ah cm qq mef r ak p8fx lika pc5k3kc mh vhk iqw3rm ek bx5g0d tv37kc gk5yo nno8w5xe q7v p g tdj dt dk5i2y0y which allows you to view details of the jobs when clicked or hovered over.

Logging



All Perforce plugin operations are logged into teamcity-vcs.log files with category jetbrains.buildServer.VCS.P4 (on an agent or on a server, depending on the operation context). The detailed logging can be enabled with TeamCity Server Logs.

Please refer to a separate page.

Please refer to a separate page.