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

changeView option ignored, not added to client spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • Jenkins v2.175
      p4-plugin v1.9.7
      Perforce Server: P4D/LINUX26X86_64/2017.1/1559660 (2017/08/31)

      Using the following checkout step, the changeView option is ignored. It is not added to the client spec and files from later changelists are synced to the workspace:

      Stage('Test') {
          checkout([
              $class: 'PerforceScm',
              credential: 'mycredentials',
              populate: [
                  $class: 'ForceCleanImpl',
                  have: true,
                  pin:  '',
                  quiet: true,
                  parallel: [
                      enable: false,
                      minbytes: '1024',
                      minfiles: '1',
                      path: '/usr/bin/p4',
                      threads: '4'
                  ]
              ],
              workspace: [
                  $class: 'ManualWorkspaceImpl',
                  charset: 'none',
                  name: 'jenkins-mynode-testing',
                  syncID: 'jenkins-mynode-testing',
                  pinHost: false,
                  spec: [
                      allwrite: true,
                      backup: false,
                      clobber: false,
                      compress: false,
                      line: 'LOCAL',
                      locked: false,
                      modtime: false,
                      rmdir: false,
                      serverID: '',
                      streamName: '',
                      type: 'WRITABLE',
                      view: '//depot/mypath/... //jenkins-mynode-testing/...',
                      changeView: '//depot/mypath/...@1185739'
                  ]
              ]
          ])
      }

      Console output:

      Started by user Aaron Miller
      Replayed #12
      Running in Durability level: PERFORMANCE_OPTIMIZED
      Loading library sharedlibrary@now
      (p4):cmd:... p4 changes -m1 //depot/jenkins-path/sh___
      p4 changes -m1 //depot/jenkins-path/shared/.../...@now
      
      Change 1187280 on 2019/05/04 by amiller@am_ws_kilo 'Remove debug code
      
      reviewed by:'
      (p4):stop:3
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:6
      (p4):cmd:... p4 client -i
      p4 client -i
      
      Client jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5 saved.
      
      (p4):stop:7
      (p4):cmd:...   View:
            //depot/jenkins-path/shared/... //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...
      ...   Root: /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary
      (p4):stop:
      (p4):cmd:... p4 counter change
      p4 counter change
      
      (p4):stop:8
      (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...
      p4 changes -m1 -ssubmitted //jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5/...
      
      Change 1187280 on 2019/05/04 by amiller@am_ws_kilo 'Remove debug code
      
      reviewed by:'
      (p4):stop:9
      (p4):cmd:... p4 repos -C
      p4 repos -C
      
      (p4):stop:10
      P4: builds: 1187280 
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:6
      
      P4 Task: establishing connection.
      ... server: p4.mydomain.com:1666
      ... node: jenkins2.mydomain.com
      Building on Node: master
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:6
      
      P4 Task: establishing connection.
      ... server: p4.mydomain.com:1666
      ... node: jenkins2.mydomain.com
      
      P4 Task: reverting all pending and shelved revisions.
      (p4):cmd:... p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
      p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
      
      /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/... - file(s) not opened on this client.
      
      (p4):stop:7
      ... rm [abandoned files]
      duration: (4ms)
      
      (p4):cmd:... p4 sync -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...#none
      p4 sync -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...#none
      
      (p4):stop:8
      ... rm -rf /home/jenkins/jobs/testing/workspace@libs/sharedlibrary
      
      P4 Task: syncing files at change: 1187280
      (p4):cmd:... p4 sync -f -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...@1187280
      p4 sync -f -q /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...@1187280
      
      ... totalFileSize 75308
      ... totalFileCount 18
      
      (p4):stop:9
      duration: (21ms)
      
      P4: unable to save changes, null changelogFile.
      
      P4Task: cleanup Client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:6
      
      P4 Task: establishing connection.
      ... server: p4.mydomain.com:1666
      ... node: jenkins2.mydomain.com
      P4 Task: cleanup client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      (p4):cmd:... p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -o jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      (p4):stop:7
      (p4):cmd:... p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
      p4 revert /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/...
      
      /home/jenkins/jobs/testing/workspace%40libs/sharedlibrary/... - file(s) not opened on this client.
      
      (p4):stop:8
      P4 Task: remove client: jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      (p4):cmd:... p4 client -d jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      p4 client -d jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5
      
      Client jenkins-lib-67d02aa4-11d4-4b7a-ae6f-4965f0aa80c5 deleted.
      
      (p4):stop:9
      [Pipeline] Start of Pipeline
      Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
      [Pipeline] stage
      [Pipeline] { (Test)
      Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
      [Pipeline] node
      Running on mynode in /home/jenkins/workspace/testing
      [Pipeline] {
      Scripts not permitted to use staticMethod org.jenkinsci.plugins.workflow.cps.Safepoint safepoint. Administrators can decide whether to approve or reject this signature.
      [Pipeline] checkout
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:6
      (p4):cmd:... p4 counter change
      p4 counter change
      
      (p4):stop:7
      (p4):cmd:... p4 changes -m1 -ssubmitted //jenkins-mynode-testing/...
      p4 changes -m1 -ssubmitted //jenkins-mynode-testing/...
      
      Change 1186739 on 2019/05/01 by someone@vm-ca-2 'Don't consume license if the De'
      (p4):stop:8
      (p4):cmd:... p4 repos -C
      p4 repos -C
      
      (p4):stop:9
      P4: builds: 1186739 
      Building on Node: mynode
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:6
      
      P4 Task: establishing connection.
      ... server: p4.mydomain.com:1666
      ... node: mynode.mydomain.com
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:6
      
      P4 Task: establishing connection.
      ... server: p4.mydomain.com:1666
      ... node: mynode.mydomain.com
      
      P4 Task: reverting all pending and shelved revisions.
      (p4):cmd:... p4 revert /home/jenkins/workspace/testing/...
      p4 revert /home/jenkins/workspace/testing/...
      
      /home/jenkins/workspace/testing/... - file(s) not opened on this client.
      
      (p4):stop:7
      ... rm [abandoned files]
      duration: (6ms)
      
      (p4):cmd:... p4 sync -q /home/jenkins/workspace/testing/...#none
      p4 sync -q /home/jenkins/workspace/testing/...#none
      
      ... totalFileSize 0
      ... totalFileCount 21818
      
      (p4):stop:8
      ... rm -rf /home/jenkins/workspace/testing
      
      P4 Task: syncing files at change: 1186739
      (p4):cmd:... p4 sync -f -q /home/jenkins/workspace/testing/...@1186739
      p4 sync -f -q /home/jenkins/workspace/testing/...@1186739
      
      ... totalFileSize 5853084823
      ... totalFileCount 28808
      
      P4: saving built changes.
      Found last change 1186739 on syncID jenkins-mynode-testing
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:6
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:3
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:4
      (p4):cmd:... p4 info
      p4 info
      
      (p4):stop:5
      (p4):cmd:... p4 client -o jenkins-mynode-testing
      p4 client -o jenkins-mynode-testing
      
      (p4):stop:6
      ... done
      
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] End of Pipeline
      Finished: SUCCESS

      If I manually create a comparable client spec and sync with the command-line p4 client, the workspace is limited to the specified changelist as expected.

            p4karl Karl Wirth
            aaronm Aaron Miller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: