P4 Plugin - By Perforce Software. Jenkins plugin for a Perforce Helix Versioning Engine.



Please consider helping out and joining this project to make it even better.  

There are many features to add and a growing backlog of SIRs, I am happy to accept GitHub pull requests or Shelved Swarm reviews.  Any questions please contact me via our support team support@perforce.com.

Kind regards,



P4 Plugin for Jenkins manages Perforce Helix workspaces; synchronising code and polling/triggering builds. 

The P4 Plugin has been fully tested against Helix P4D release version 2015.1

The plugin supports:



All issues are managed on the JIRA Agile Board, when reporting an issue please set the Component to `P4` (not `Perforce`).



The plugin makes use of the Jenkins Credential store making it easier to manage the Perforce Helix Server connection for multiple Jenkins jobs.  P4 Plugin credentials must be added to the Global or a user defined domain, using one of the two supported Credentials: 'Perforce Password Credential' or 'Perforce Ticket Credential'.

To add a Credential:
1. Navigate to the Jenkins Credentials page (select 'Credentials' on the left hand side)
2. Select 'Global credentials' (or add domain if needed)
3. Select 'Add Credentials' from the left hand side
4. Choose 'Perforce Password Credential' from the 'Kind' drop-down select
5. Enter a Description e.g. local test server
6. Enter the P4Port e.g. localhost:1666
7. Enter a valid username and password
8. Press the 'Test Connection' button (you should see Success)
9. Click 'Save' to save.

The 'Perforce Ticket Credential' supports using a ticket file (such as the default P4TICKETS file) or a ticket value (returned by the command p4 login -p). If Ticket authentication is used for remote builds the Ticket must be valid for the remote host (either login on the remote host or use p4 login -a).

All Perforce Credential types support SSL for use on a Secured Helix Versioning Engine; to use just check the SSL box and provide the Trust fingerprint.


Client Workspaces are configured on the Jenkins Job configuration page and support the following behaviours:


The P4 Plugin will populate the Jenkins workspace with the file revisions needed for the build. The way the workspace is populated is configured on the Jenkins Job configuration page and support the following behaviours:

This method is not recommended as the cost of IO resources on server and client are high. Apart from exceptional circumstances the Automatic cleanup and sync option will produce the same result.


Please refer to the README for more information.