Configure P4 Server extensions

P4 Server provides extensions to customize server operations or invoke additional processing for specific versioning operations. Perforce TeamHub extensions notify P4 DAM about activity on the P4 Server. When extensions are configured, any pushes to graph depots or any submits to stream depots are visible as events in the P4 DAM Activity view.

You can easily install, view the status of, and remove extensions using the TeamHub admin UI. Extensions are installed on the P4 Server that P4 DAM is configured to connect to.

Configuring extensions requires that you already have an administrator bot account. For more information on setting up an administrator bot account, see Step 1: Create a P4 DAM administrator bot.

Step 1: Create a P4 DAM administrator bot

Perform the following steps to create a new administrator bot. The administrator bot cannot be changed after creation. This option is only available for company admins.
  1. Login to P4 DAM.

  2. Click your avatar.

  3. Click Go to TeamHub.

  4. In the Main menu pane, click Bots.

  5. In the Bots view, click the Plus button Add icon.

    The Create bot pane opens.

  6. Provide the following information:

    • Short name: Username for the bot. You cannot modify the short name after creating a bot.

    • Password: Password for the bot. Leaving the field empty generates a random password. Bot users can view the password in the bot settings form.

    • Company admin bot: Select to create a company admin bot for P4 DAM.

    • Private bot: Select to hide bot from other users.

  1. Click Create.

The admin bot is created.

Step 2: Configure the P4 DAM administrator bot

Select the account key for the company administrator bot that is used by P4 Server to perform authenticated calls. The bot generates events for P4 DAM.

  1. Log in to the TeamHub admin UI. See Logging in to the TeamHub admin UI.

  2. Click P4 Extensions.

    The Configure P4 Server Extensions page opens.

  3. Under TeamHub properties, click Account Key.

    A dropdown opens.

  4. Select a bot.

  5. Click Save.

    The bot is saved to the account key.

Step 3: Set the hostname

Set the hostname for the P4 DAM instance.

  1. Log in to the TeamHub admin UI. See Logging in to the TeamHub admin UI.

  2. Click Preferences.

  3. In Configure instance under Hostname, enter the URL the P4 DAM instance users access.

  4. Click Save preferences.

    The hostname is set.

Step 4: Configure Perforce TeamHub extension

The Perforce TeamHub extension, named hth-extension, is required to create events for stream and classic depots. This extension supports the following events:

  • change-commit

If the extension is installed, you can view general and status information on the Configure P4 Server Extensions page. You can also install and remove the extension from this page.

  1. Log in to the TeamHub admin UI. See Logging in to the TeamHub admin UI.

  2. Click P4 Extensions.

    The Configure P4 Server Extensions page opens.

  3. Under TeamHub extensions, click Install.

    The extension is installed to the P4 Server.

    If the Install button is not available, configure the P4 DAM administrator bot first.

Upgrade the Perforce TeamHub extension

You can upgrade the extension when a new version is available.

  1. Log in to the TeamHub admin UI. See Logging in to the TeamHub admin UI.

  2. Click P4 Extensions.

    The Configure P4 Server Extensions page opens.

  3. Under TeamHub extensions, click Upgrade.

    The extension is removed and the new version is installed.

Remove the Perforce TeamHub extension

You can remove the extension from P4 Server.

  1. Log in to the TeamHub admin UI. See Logging in to the TeamHub admin UI.

  2. Click P4 Extensions.

    The Configure P4 Server Extensions page opens.

  3. Under TeamHub extensions, click Remove.

    The extension is removed from P4 Server.

Perforce TeamHub Graph extension

This extension is not used for P4 DAM.