Triggers and extensions
Triggers and server extensions allow you to customize P4 behavior to enforce policies, automate workflows, and integrate with external systems.
For new server customizations, consider using server extensions where possible. Extensions run within P4, are managed using P4 commands, and do not require external executables or platform-specific deployment. Triggers remain fully supported and are useful when integration with external applications, scripts, or operating-system tools is required.
|
Server Extensions |
Triggers |
|
|---|---|---|
|
Release |
New in 2019.1 |
Have been a feature of P4 Server for twenty years |
| Status |
Supported as of 2019.1 |
Remain fully supported |
| Deployment |
Managed and deployed within P4 Server |
Installed and managed as external scripts or executables |
| Recommended use |
Recommended for many new server customizations |
Useful for integrations with external systems and existing automation |
|
Environment |
Part of the P4 product executables. No external dependencies. Written in the Lua programming language. Not platform-specific. |
An external program supplied and managed by the P4 administrator. |
| Starting point for command-line help |
command-line: p4 help extension |
command-line: p4 help triggers |
To learn about P4 server extensions, see Extensions.
Getting started with server extensions
If you are new to server extensions, start with the following topics:
-
Extensions - Introduces server extensions and their capabilities.
-
Extension basics - Explains extension structure and concepts.
-
Create and deploy a server extension - Walks through creating and deploying an extension.
-
Server extension callbacks - Describes the available extension callback points.
-
Server extension errors and troubleshooting - Helps diagnose and resolve common issues.