Installing triggers
With your P4 Code Review instance configured, the final step is to set up your P4 Server to notify your instance of important events. This is achieved using triggers.
This document covers how to install triggers on P4 Code Review. For more information on how to configure P4 Server triggers, see the P4 Server documentation.
P4 Code Review can be connected to P4 Servers (P4D) and commit servers.
- To configure P4 Code Review to connect to more than one P4 Server (P4D), see Multiple P4 Server instances.
- To configure P4 Code Review to connect to a P4 Server configured to use commit-edge architecture, see Commit-edge deployment.
P4 Code Review does not support P4 Servers that are configured to use P4AUTH. For more information, see Centralized authorization server (P4AUTH) in the P4 Server Administration Documentation.
Prerequisites
Before installing P4 Code Review triggers, check the following conditions:
-
Do not install the P4 Code Review extension on your P4 Server if you intend on using P4 Code Review triggers.
-
P4 Code Review does not support P4 Servers that are configured to use P4AUTH. For more information, see Centralized authorization server (P4AUTH) in the P4 Server Administration Documentation.
Setup up P4 Code Review triggers
Use P4 Server triggers to customize the operation of the server. For example, use P4 Server triggers to automatically run custom scripts or commands when certain events happen, such as submitting a changelist or creating a branch.
P4 Code Review provides a trigger script, written in Perl, that notifies P4 Code Review about activity within the P4 Server.
For more information on configuring the Perl trigger script, see Trigger options
The operating system which hosts your P4 Server determines how to set up P4 Code Review triggers: