Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5182

Provide a force-sync and/or clean pull feature for Perforce SCM checkouts



    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Postponed
    • Component/s: p4-plugin
    • Labels:
    • Similar Issues:


      It seems like a "clean pull" option would be a useful general feature for all SCMs. One thing that I've seen done in the past is to do a "clean pull" every Nth build, or every build at a given time, so that would be a nice extension of this.

      It's a little tougher to do with Perforce than some other SCMs with its server-side state. Currently the Perforce plugin blocks workspace deletion form the UI. Making that work would also be nice.

      So, I think a complete "clean build" feature package might look like:
      1. enable manual workspace deletion in the UI
      2. add a sticky force-sync option to always pass -f to the sync
      3. add a sticky workspace clean option to nuke the workspace before syncing

      I think after running #1 or #3, a -f would have to be implicitly added to the next sync. That shouldn't be too hard.

      Also consider adding support for the new -p flag:

      Perforce 2007.2 introduced "-p" to p4 sync which makes it behave "just like the others". From p4 help sync :

      "The -p flag populates the client workspace, but does not update the
      server to reflect those updates. Any file that is already synced or
      opened will be bypassed with a warning message. This option is very
      useful for build clients or when publishing content without the
      requirement of saving the client workspace state."



          javadude Carl Quinn created issue -
          rpetti Rob Petti made changes -
          Field Original Value New Value
          Resolution Postponed [ 6 ]
          Status Open [ 1 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 135271 ] JNJira + In-Review [ 203372 ]
          ircbot Jenkins IRC Bot made changes -
          Component/s p4-plugin [ 19224 ]
          Component/s perforce-plugin [ 15506 ]


            Unassigned Unassigned
            javadude Carl Quinn
            4 Vote for this issue
            5 Start watching this issue