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

Client MODTIME is not set using source: depotSource(spec)

XMLWordPrintable

      We are using the p4sync step in the following way, inside our pipeline to sync some thirdparty libraries:

      p4sync charset: 'none',
          credential: 'p4-buildserver-credentials',
          format: "j-\${NODE_NAME}-\${JOB_NAME}-\${EXECUTOR_NUMBER}-${suffix}",
          populate: autoClean(
              delete: true,
              modtime: true,
              parallel: [
                  enable: true, minbytes: '1024', minfiles: '1', threads: '8'
              ],
              pin: "$env.GLOBAL_P4_CHANGELIST",
              quiet: true,
              replace: true,
              tidy: false
          ),
          source: depotSource(spec) // spec is a variable defined elsewhere
      

      The problem seems to be that the modtime: true appears to be useless, because the workspace as created in perforce does not have the MODTIME option set so files are not being synced with the modification time from the depot, and are having their modification times updated each time by the p4 reconcile command.

      An argument to depoSource to specify that the workspace should have modtime enabled seems like it would be very useful.

      Alternatively, perhaps the modtime and other options should be passed to the workspace spec here:
      https://swarm.workshop.perforce.com/projects/p4-jenkins/files/main/src/main/java/org/jenkinsci/plugins/p4/workflow/source/DepotSource.java#33

            p4karl Karl Wirth
            alisdair_robertson Alisdair Robertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: