Installation
This chapter covers the installation of the P4 for Jenkins.
Requirements
- Jenkins 2.462.3 or greater.
- P4 Server 2020.1 or greater.
- Minimum Perforce Protection of open for the Jenkins user.
- Review Build feature requires P4 Code Review 2022.1 or greater.
Known Limitations
-
One Jenkins job per P4 Code Review branch.
-
P4 Build Farm servers are not supported, they were superseded byP4 Commit-Edge servers in 2013.2
-
The change summary for a concurrent build may report additional changes if that build is already in progress, JENKINS-57901.
Installation
- Open Jenkins in a browser.
- Go to Manage Jenkins.
- In System Configuration, click Plugins.
- In the side bar menu, click Available plugins.
- Search for P4 Plugin.
- Select the check box and click Install (found in the top right corner of the page).
If you are unable to find the plugin, you may need to refresh the update site.
- Select the Advanced tab (under Manage Plugins)
- Click the Check now button at the bottom of the page.
- When Done go back to the update center and try again.
Building
To build the plugin and run the tests use the following:
mvn package
For the tests to run you must have p4d in your PATH, to skip tests use the -DskipTests flag.
Manual installation
- Open Jenkins in a browser.
- Go to Manage Jenkins.
- In System Configuration, click Plugins.
- In the side bar menu, click Advanced settings.
- In the Deploy Plugin section, click the Browse.
- Click Deploy.
P4 for Jenkins will start to install in Jenkins.