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

cifsPublisher plugin not copying right files using wildcards

XMLWordPrintable

    • 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.

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

              Created:
              Updated:
              Resolved: