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

p4 plugin : p4cleanup do not operate on same client as p4 sync

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • None
    • jenkins 2.7.2
      p4 plugi 1.4.4

      I have an issue with current implementation (p4 plugin 1.4.4).

      I try, in a single pipeline, to do several cleanup.

      From my understanding, p4cleanup do not accept any configuration, it uses the config defined on previous 'p4 sync'.

      So, I tried to loop over some jobs, and in the loop, perform the sync then the cleanup.

      Matter is : the cleanup is always done on the same client, the first of the loop.

      Example pipeline :

      clients=['foo','bar','baz'];
      
      for (String client : clients){
      
         stage client
      
         node('master'){
            p4sync charset: 'none', credential: 'PERFORCE',  depotPath: '//depot/somepath', format: client, populate: [$class: 'CheckOnlyImpl', force: false, have: false, modtime: false, quiet: true]
              p4cleanup true
       }
      }
      

      Result :

      p4 sync preview only on foo
      p4 cleanup on foo

      p4 sync preview only on bar
      p4 cleanup on foo

      p4 sync preview only on baz
      p4 cleanup on foo

      in the end 2 clients remain.

      This make the p4cleanup almost unusable as is. (unless creating a cleanupjob dedicated to every job, what a nightmare)

            Unassigned Unassigned
            squalou squalou jenkins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: