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

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

      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

          [JENKINS-55253] Client MODTIME is not set using source: depotSource(spec)

          Alisdair Robertson created issue -
          Paul Allen made changes -
          Labels New: P4_SUPPORT
          Karl Wirth made changes -
          Attachment New: image-2019-07-01-17-30-47-996.png [ 47832 ]
          Karl Wirth made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Karl Wirth made changes -
          Assignee New: Karl Wirth [ p4karl ]

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

              Created:
              Updated:
              Resolved: