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

Syncing with "Preview check only" is using -n instead of -k, not populating have list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • Jenkins 2.73.1 (Windows)
      P4 Plugin 1.8.4

      I'm using this Pipeline code snippet to check out code. I want the job to run 'p4 sync -k' so it populates a have list, but don't actually sync files (just like https://issues.jenkins-ci.org/browse/JENKINS-24490)

       
      checkout perforce(
          credential: 'p4_server',
          populate: previewOnly(quiet: true),
          workspace: streamSpec(
              charset: 'none',
              format: 'jenkins-${NODE_NAME}-${JOB_NAME}',
              pinHost: false,
              streamName: '//depot/stream'
          )
      )
       
      When I look at the build log, the p4 plugin is running "p4 sync -n", not "p4 sync -k". Both the documentation and several JIRA issues all state that this option should use -k, but it doesn't seem to be.
       
      ---------------------------------------------------
       
      [Pipeline] checkout*15:46:08*
      ... p4 client -o jenkins-job-client +
       
      15:46:08
      ... p4 info +
       
      15:46:08
      ... p4 client -o jenkins-job-client +
       
      15:46:08
      ... p4 client -i +
       
      15:46:08
      ... p4 client -o jenkins-job-client +
       
      15:46:08
      ... p4 client -i +
       
      15:46:08 ... client: jenkins-job-client*15:46:08*
      ... p4 client -o jenkins-job-client +
       
      15:46:08
      ... p4 info +
       
      15:46:08
      ... p4 counter change +
       
      15:46:08
      ... p4 changes -m1 -ssubmitted //jenkins-job-client/..___ +
       
      15:46:08
      ... p4 repos -C +
       
      15:46:14 Building on Node: NODE_NAME*15:46:14*
      ... p4 client -o jenkins-job-client +
       
      15:46:14
      ... p4 info +
       
      15:46:14 15:46:14 P4 Task: establishing connection.15:46:14 ... server: p4-server:1666*15:46:14* ... node: NODE_NAME*15:46:14* 15:46:14 P4 Task: syncing files at change: 547297*15:46:14*
      ... p4 sync -n -q D:\workspace\jayspang-test-trigger/...@547297 +
       
      15:46:15 duration: 0m 1s*15:46:15* 15:46:15 P4 Task: saving built changes.15:46:15 Found last change 547036 on syncID jenkins-NODE_NAME-jayspang-test-trigger*15:46:15*
      ... p4 client -o jenkins-job-client +
       
      15:46:15
      ... p4 info +
       
      15:46:15
      ... p4 changes -m20 //jenkins-job-client/...@547036,54___ +
       
      15:46:15
      ... p4 changes -l -m1 @547297 +
       
      15:46:15
      ... p4 user -o username +
       
      15:46:15
      ... p4 describe -s -m51 547297 +
       
      15:46:15
      ... p4 fixes -c547297 +
       
      15:46:15 ... done

            p4paul Paul Allen
            jayspang Jay Spang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: