ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Critical
    • Component/s: p4-plugin
    • None
    • Environment:
      p4-plugin 1.17.2
      Jenkins 2.555.1

      When using paths in 'p4publish' it is submitting unchanged files.

       

      Reproduction Steps:

      (1) Create a mainline stream called '//streans/main'.

      (2) Submit the following named (generic text contents) files as  binary+l files:

      p4 add -t binary+l //streams/main/bin/1.bin 
      p4 add -t binary+l //streams/main/bin/2.bin
      p4 add -t binary+l //streams/main/bin/3.bin
      p4 add -t binary+l //streams/main/bin/4.bin
      p4 submit -d "binary+l files"

      (3) Create a job with the following Jenkinsfile:

       

      pipeline {
          agent any    stages {
              stage('SyncAndPublish') {
                  steps {
                   checkout perforce(credential: 'JenkinsMaster', populate: autoClean(delete: true, modtime: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: streamSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, streamName: '//streams/main'))
                   sh 'chmod -R +w bin; cd bin; echo test >> 2.bin; echo test >> 3.bin; echo test >> 4.bin'
                  p4publish credential: 'JenkinsMaster', publish: shelve(delete: false, description: 'Shelved by Jenkins. Build: ${BUILD_TAG}', modtime: false, onlyOnSuccess: false, paths: '''//streams/main/bin/1.bin
      //streams/main/bin/4.bin''', revert: false), workspace: streamSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, streamName: '//streams/main')
                  }
              }
          }
      } 

      (4) Run the job twice.

      Outcome:

      The job shelves 1.bin and 4.bin, but only 4.bin has been edited.

      Expected Outcome:

      It should only shelve 4.bin.

       

       

       

       

            Assignee:
            Unassigned
            Reporter:
            Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: