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

cifsPublisher plugin not copying right files using wildcards

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • cifs-plugin
    • None

      0
      down vote
      favorite

      In my Jenkins scripted pipeline I'm trying to copy files to a remote Windows Share using cifsPublisher

      As documented here I should use

      myPrj/deploy/**/*
      

      as sourceFiles pattern but files I expect to be copied are not.

      This is my Jenkinsfile step:

      stage('Save WAR'){
          //
          sh 'ls -laR ./myPrj/deploy/'
          //
          cifsPublisher(publishers: [[
              configName: 'myConfig',
              transfers: [[cleanRemote: false,
                  excludes: '',
                  flatten: false,
                  makeEmptyDirs: true,
                  noDefaultExcludes: false,
                  patternSeparator: '',
                  remoteDirectory: 'Server',
                  remoteDirectorySDF: false,
                  removePrefix: '',
                  sourceFiles: './myPrj/deploy/**/*' ]],
              usePromotionTimestamp: false,
              useWorkspaceInPromotion: false,
              verbose: true]])        
      }
      

      This is the verbose output:

      + ls -laR ./myPrj/deploy/
      ./myPrj/deploy/:
      totale 0
      drwxr-xr-x  3 jenkins jenkins  41 ago  3 11:55 .
      drwxr-xr-x 11 jenkins jenkins 299 ago  3 11:56 ..
      drwxr-xr-x  2 jenkins jenkins  65 ago  3 11:57 myPrj-01.01.01-201808031155
      
      ./myPrj/deploy/myPrj-01.01.01-201808031155:
      totale 443392
      drwxr-xr-x 2 jenkins jenkins        65 ago  3 11:57 .
      drwxr-xr-x 3 jenkins jenkins        41 ago  3 11:55 ..
      -rw-r--r-- 1 jenkins jenkins 269154173 ago  3 11:57 Dist.zip
      -rw-r--r-- 1 jenkins jenkins       168 ago  3 11:55 INFO.txt
      -rw-r--r-- 1 jenkins jenkins 184870342 ago  3 11:57 myPrj##01.01.01.war
      [Pipeline] cifsPublisher
      CIFS: Connecting from host [jenkins]
      CIFS: Connecting with configuration [myConfig] ...
      CIFS: Removing WINS from name resolution
      CIFS: Setting response timeout [30.000]
      CIFS: Setting socket timeout [35.000]
      CIFS: Setting buffer size to: [4.096] Bytes
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/.com.apple.timemachine.supported]
      CIFS: copy [smb://WinServer/SHARE//Jenkins/Server/Jenkinsfile]
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/build.gradle]
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew]
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew.bat]
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/sonar-project.properties]
      CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/vstop.png]
      CIFS: Disconnecting configuration [myConfig] ...
      CIFS: Transferred 7 file(s)
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

      Files that are copied are from the workspace root directory.

          [JENKINS-52997] cifsPublisher plugin not copying right files using wildcards

          sgargel created issue -
          sgargel made changes -
          Environment Original: OS: Debian 9
          Jenkins ver. 2.121.2
          Publish Over CIFS 0.11

          Publish Over CIFS org.jenkins-ci.plugins:publish-over-cifs:0.11 The MIT license
          Apache Commons IO commons-io:commons-io:2.5 Apache License, Version 2.0
          Bouncy Castle Provider org.bouncycastle:bcprov-jdk15on:1.54 Bouncy Castle Licence
          jCIFS NG eu.agno3.jcifs:jcifs-ng:2.0.5 LGPL
          New: OS: Debian 9
          Jenkins ver. 2.121.2
          Publish Over CIFS 0.11

          Publish Over CIFS: org.jenkins-ci.plugins:publish-over-cifs:0.11
          Apache Commons IO: commons-io:commons-io:2.5
          Bouncy Castle Provider: org.bouncycastle:bcprov-jdk15on:1.54
          jCIFS NG: eu.agno3.jcifs:jcifs-ng:2.0.5
          sgargel made changes -
          Description Original:  0
          down vote
          favorite

          In my Jenkins scripted pipeline I'm trying to copy files to a remote Windows Share using [cifsPublisher|https://wiki.jenkins.io/display/JENKINS/Publish+Over+CIFS+Plugin]

          As documented [here |https://wiki.jenkins.io/display/JENKINS/Publish+Over#PublishOver-Examples]I should use myPrj/deploy/**/* as sourceFiles pattern but files I expect to be copied are not.

          This is my Jenkinsfile step:


          {code:java}
          stage('Save WAR'){
              //
              sh 'ls -laR ./myPrj/deploy/'
              //
              cifsPublisher(publishers: [[
                  configName: 'myConfig',
                  transfers: [[cleanRemote: false,
                      excludes: '',
                      flatten: false,
                      makeEmptyDirs: true,
                      noDefaultExcludes: false,
                      patternSeparator: '',
                      remoteDirectory: 'Server',
                      remoteDirectorySDF: false,
                      removePrefix: '',
                      sourceFiles: './myPrj/deploy/**/*' ]],
                  usePromotionTimestamp: false,
                  useWorkspaceInPromotion: false,
                  verbose: true]])
          }
          {code}


          This is the verbose output:


          {noformat}
          + ls -laR ./myPrj/deploy/
          ./myPrj/deploy/:
          totale 0
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 .
          drwxr-xr-x 11 jenkins jenkins 299 ago 3 11:56 ..
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 myPrj-01.01.01-201808031155

          ./myPrj/deploy/myPrj-01.01.01-201808031155:
          totale 443392
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 .
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 ..
          -rw-r--r-- 1 jenkins jenkins 269154173 ago 3 11:57 Dist.zip
          -rw-r--r-- 1 jenkins jenkins 168 ago 3 11:55 INFO.txt
          -rw-r--r-- 1 jenkins jenkins 184870342 ago 3 11:57 myPrj##01.01.01.war
          [Pipeline] cifsPublisher
          CIFS: Connecting from host [jenkins]
          CIFS: Connecting with configuration [myConfig] ...
          CIFS: Removing WINS from name resolution
          CIFS: Setting response timeout [30.000]
          CIFS: Setting socket timeout [35.000]
          CIFS: Setting buffer size to: [4.096] Bytes
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/.com.apple.timemachine.supported]
          CIFS: copy [smb://WinServer/SHARE//Jenkins/Server/Jenkinsfile]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/build.gradle]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew.bat]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/sonar-project.properties]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/vstop.png]
          CIFS: Disconnecting configuration [myConfig] ...
          CIFS: Transferred 7 file(s)
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: SUCCESS
          {noformat}


          Files that are copied are from the workspace root directory.
          New:  0
          down vote
          favorite

          In my Jenkins scripted pipeline I'm trying to copy files to a remote Windows Share using [cifsPublisher|https://wiki.jenkins.io/display/JENKINS/Publish+Over+CIFS+Plugin]

          As documented [here |https://wiki.jenkins.io/display/JENKINS/Publish+Over#PublishOver-Examples]I should use {{myPrj/deploy/**/*}} as sourceFiles pattern but files I expect to be copied are not.

          This is my Jenkinsfile step:


          {code:java}
          stage('Save WAR'){
              //
              sh 'ls -laR ./myPrj/deploy/'
              //
              cifsPublisher(publishers: [[
                  configName: 'myConfig',
                  transfers: [[cleanRemote: false,
                      excludes: '',
                      flatten: false,
                      makeEmptyDirs: true,
                      noDefaultExcludes: false,
                      patternSeparator: '',
                      remoteDirectory: 'Server',
                      remoteDirectorySDF: false,
                      removePrefix: '',
                      sourceFiles: './myPrj/deploy/**/*' ]],
                  usePromotionTimestamp: false,
                  useWorkspaceInPromotion: false,
                  verbose: true]])
          }
          {code}


          This is the verbose output:


          {noformat}
          + ls -laR ./myPrj/deploy/
          ./myPrj/deploy/:
          totale 0
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 .
          drwxr-xr-x 11 jenkins jenkins 299 ago 3 11:56 ..
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 myPrj-01.01.01-201808031155

          ./myPrj/deploy/myPrj-01.01.01-201808031155:
          totale 443392
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 .
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 ..
          -rw-r--r-- 1 jenkins jenkins 269154173 ago 3 11:57 Dist.zip
          -rw-r--r-- 1 jenkins jenkins 168 ago 3 11:55 INFO.txt
          -rw-r--r-- 1 jenkins jenkins 184870342 ago 3 11:57 myPrj##01.01.01.war
          [Pipeline] cifsPublisher
          CIFS: Connecting from host [jenkins]
          CIFS: Connecting with configuration [myConfig] ...
          CIFS: Removing WINS from name resolution
          CIFS: Setting response timeout [30.000]
          CIFS: Setting socket timeout [35.000]
          CIFS: Setting buffer size to: [4.096] Bytes
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/.com.apple.timemachine.supported]
          CIFS: copy [smb://WinServer/SHARE//Jenkins/Server/Jenkinsfile]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/build.gradle]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew.bat]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/sonar-project.properties]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/vstop.png]
          CIFS: Disconnecting configuration [myConfig] ...
          CIFS: Transferred 7 file(s)
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: SUCCESS
          {noformat}


          Files that are copied are from the workspace root directory.
          sgargel made changes -
          Description Original:  0
          down vote
          favorite

          In my Jenkins scripted pipeline I'm trying to copy files to a remote Windows Share using [cifsPublisher|https://wiki.jenkins.io/display/JENKINS/Publish+Over+CIFS+Plugin]

          As documented [here |https://wiki.jenkins.io/display/JENKINS/Publish+Over#PublishOver-Examples]I should use {{myPrj/deploy/**/*}} as sourceFiles pattern but files I expect to be copied are not.

          This is my Jenkinsfile step:


          {code:java}
          stage('Save WAR'){
              //
              sh 'ls -laR ./myPrj/deploy/'
              //
              cifsPublisher(publishers: [[
                  configName: 'myConfig',
                  transfers: [[cleanRemote: false,
                      excludes: '',
                      flatten: false,
                      makeEmptyDirs: true,
                      noDefaultExcludes: false,
                      patternSeparator: '',
                      remoteDirectory: 'Server',
                      remoteDirectorySDF: false,
                      removePrefix: '',
                      sourceFiles: './myPrj/deploy/**/*' ]],
                  usePromotionTimestamp: false,
                  useWorkspaceInPromotion: false,
                  verbose: true]])
          }
          {code}


          This is the verbose output:


          {noformat}
          + ls -laR ./myPrj/deploy/
          ./myPrj/deploy/:
          totale 0
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 .
          drwxr-xr-x 11 jenkins jenkins 299 ago 3 11:56 ..
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 myPrj-01.01.01-201808031155

          ./myPrj/deploy/myPrj-01.01.01-201808031155:
          totale 443392
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 .
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 ..
          -rw-r--r-- 1 jenkins jenkins 269154173 ago 3 11:57 Dist.zip
          -rw-r--r-- 1 jenkins jenkins 168 ago 3 11:55 INFO.txt
          -rw-r--r-- 1 jenkins jenkins 184870342 ago 3 11:57 myPrj##01.01.01.war
          [Pipeline] cifsPublisher
          CIFS: Connecting from host [jenkins]
          CIFS: Connecting with configuration [myConfig] ...
          CIFS: Removing WINS from name resolution
          CIFS: Setting response timeout [30.000]
          CIFS: Setting socket timeout [35.000]
          CIFS: Setting buffer size to: [4.096] Bytes
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/.com.apple.timemachine.supported]
          CIFS: copy [smb://WinServer/SHARE//Jenkins/Server/Jenkinsfile]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/build.gradle]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew.bat]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/sonar-project.properties]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/vstop.png]
          CIFS: Disconnecting configuration [myConfig] ...
          CIFS: Transferred 7 file(s)
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: SUCCESS
          {noformat}


          Files that are copied are from the workspace root directory.
          New:  0
          down vote
          favorite

          In my Jenkins scripted pipeline I'm trying to copy files to a remote Windows Share using [cifsPublisher|https://wiki.jenkins.io/display/JENKINS/Publish+Over+CIFS+Plugin]

          As documented [here |https://wiki.jenkins.io/display/JENKINS/Publish+Over#PublishOver-Examples]I should use
          {noformat}
          myPrj/deploy/**/*
          {noformat}
           as sourceFiles pattern but files I expect to be copied are not.

          This is my Jenkinsfile step:


          {code:java}
          stage('Save WAR'){
              //
              sh 'ls -laR ./myPrj/deploy/'
              //
              cifsPublisher(publishers: [[
                  configName: 'myConfig',
                  transfers: [[cleanRemote: false,
                      excludes: '',
                      flatten: false,
                      makeEmptyDirs: true,
                      noDefaultExcludes: false,
                      patternSeparator: '',
                      remoteDirectory: 'Server',
                      remoteDirectorySDF: false,
                      removePrefix: '',
                      sourceFiles: './myPrj/deploy/**/*' ]],
                  usePromotionTimestamp: false,
                  useWorkspaceInPromotion: false,
                  verbose: true]])
          }
          {code}


          This is the verbose output:


          {noformat}
          + ls -laR ./myPrj/deploy/
          ./myPrj/deploy/:
          totale 0
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 .
          drwxr-xr-x 11 jenkins jenkins 299 ago 3 11:56 ..
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 myPrj-01.01.01-201808031155

          ./myPrj/deploy/myPrj-01.01.01-201808031155:
          totale 443392
          drwxr-xr-x 2 jenkins jenkins 65 ago 3 11:57 .
          drwxr-xr-x 3 jenkins jenkins 41 ago 3 11:55 ..
          -rw-r--r-- 1 jenkins jenkins 269154173 ago 3 11:57 Dist.zip
          -rw-r--r-- 1 jenkins jenkins 168 ago 3 11:55 INFO.txt
          -rw-r--r-- 1 jenkins jenkins 184870342 ago 3 11:57 myPrj##01.01.01.war
          [Pipeline] cifsPublisher
          CIFS: Connecting from host [jenkins]
          CIFS: Connecting with configuration [myConfig] ...
          CIFS: Removing WINS from name resolution
          CIFS: Setting response timeout [30.000]
          CIFS: Setting socket timeout [35.000]
          CIFS: Setting buffer size to: [4.096] Bytes
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/.com.apple.timemachine.supported]
          CIFS: copy [smb://WinServer/SHARE//Jenkins/Server/Jenkinsfile]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/build.gradle]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/gradlew.bat]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/sonar-project.properties]
          CIFS: copy [smb://WinServer/SHARE/Jenkins/Server/vstop.png]
          CIFS: Disconnecting configuration [myConfig] ...
          CIFS: Transferred 7 file(s)
          [Pipeline] }
          [Pipeline] // stage
          [Pipeline] }
          [Pipeline] // node
          [Pipeline] End of Pipeline
          Finished: SUCCESS
          {noformat}


          Files that are copied are from the workspace root directory.
          Oleg Nenashev made changes -
          Component/s New: cifs-plugin [ 15770 ]
          Component/s Original: core [ 21134 ]
          Key Original: INFRA-1745 New: JENKINS-52997
          Workflow Original: classic default workflow [ 230326 ] New: JNJira + In-Review [ 230384 ]
          Project Original: Infrastructure [ 10301 ] New: Jenkins [ 10172 ]
          Oleg Nenashev made changes -
          Assignee New: Alex Earl [ slide_o_mix ]

          Alex Earl added a comment -

          patternSeparator should not be empty. Either remove it from the parameters, or set to '[ ,]+'

          Alex Earl added a comment - patternSeparator should not be empty. Either remove it from the parameters, or set to '[ ,]+'

          Alex Earl added a comment -

          The patternSeparator was empty.

          Alex Earl added a comment - The patternSeparator was empty.
          Alex Earl made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

          May you add a copy of your General Jenkins Config, section "Publish over CIFS"? Just to have the paths set in the "myConfig".

          Germain Barret added a comment - May you add a copy of your General Jenkins Config, section "Publish over CIFS"? Just to have the paths set in the "myConfig".

            slide_o_mix Alex Earl
            sgargel sgargel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: