Extensions
P4 server extensions are a means for administrators to customize workflow. These extensions allow you to extend product behavior in a close integration between the P4 Server runtime and your custom logic.
Server extensions are self-contained bundles of code, metadata, and other assets that interface with P4 Server through the extensions Classes and methods. The extension code runtime is embedded within the P4 Server.
Server extensions are versioned in a special extensions depot.
The output of the p4 depots command does not list the Extensions depot because this special depot is not for the ordinary user. Instead, the Extensions depot is for the administrative user with super access (see p4 protect). The command to manage server extensions, p4 extension, requires super access.
Advantages over triggers
Some built-in advantages of server extensions when compared with triggers:
- a single scripting language supports cross-platform portability
- programmatic API allows for integration of an extension with the P4 server
- configurable on a global or per depot basis
- users that the superuser has authorized to configure extensions, can do so without super-user involvement within the repo or depot that user owns
- forward compatible across product upgrades (API/runtime pinning)
- server-managed installation, execution, and replication
- Internationalization (i18n) compatibility
- can issue pre-authenticated Perforce client commands, so no need to manage a ticket for the server extension
- easy administration for installation, update or removal, by using the p4 extension command and the global and instance specs (instead of the flat triggers table). See Server extension configuration (global and instance specs).
- includes libraries for issuing web requests, sending email, storage
See also:
-
The general comparison of Triggers and extensions
-
The command line output of
p4 help extension
In this section: