jenkinsperforcechangelist

How to sync to a Perforce pending changelist in jenkins


I have a pending changelist that I want to test in the build on our Jenkins server. I tried to do this using a P4 label but syncing to the label does not pick up my pending changelist.

Is there any way to do this with Jenkins SCM configuration?


Solution

  • In general, unless you have some very special circumstances, no other workspace can sync your pending changelist's changes, because they exist ONLY on your own workstation, not on the server. The server knows the names of the files in your pending changelist, but not their contents.

    To make your changes accessible to the automated build tools, there are generally two approaches:

    1. You can shelve the changes, then instruct the build tool to build from the shelf, or
    2. You can check your changes into a development branch, then instruct the build tool to build the branch.

    Or, of course, you could check your changes into the mainline, and have the build tools build them normally, but I'm guessing from your question you don't want to do that.