Pipeline job setup
In Jenkins, a Pipeline job is a type of job where you define the build, test, and deployment process as code.
You can configure P4 for Jenkins within Jenkins to fetch your source directly from P4 Server and execute the pipeline stages automatically.
There are two methods for creating your Jenkins pipeline script:
Pipeline Script from SCM:
Use this method to store your Jenkins pipeline script (Jenkinsfile) in your P4 Server. Jenkins will pull the script directly from source control, similar to how you would set up a Freestyle job.
For more information on how to create a pipeline script from SCM, see Pipeline script from SCM setup.
Pipeline from Script:
Use this method to write your Jenkins pipeline script (Jenkinsfile) directly in Jenkins. You can create it manually, generate parts with the Snippet Generator, or combine both approaches. The Snippet Generator is a quick way to build scripts and see how they work.
For more information on how to create a pipeline script, see Pipeline script setup.