If I add shares, and restart jenkins, the CIFS shares are gone.

          [JENKINS-17112] Publish over CIFS shares do not persist

          Dirk Neuber added a comment -

          CentOS 6.4 32-bit

          Jenkins ver. 1.514
          Publish Over CIFS 0.2

          java version "1.6.0_24"
          OpenJDK Runtime Environment (IcedTea6 1.11.9) (rhel-1.57.1.11.9.el6_4-i386)
          OpenJDK Client VM (build 20.0-b12, mixed mode)

          Publish over FTP 1.9 which we use in almost every configuration is working fine ...

          Dirk Neuber added a comment - CentOS 6.4 32-bit Jenkins ver. 1.514 Publish Over CIFS 0.2 java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.9) (rhel-1.57.1.11.9.el6_4-i386) OpenJDK Client VM (build 20.0-b12, mixed mode) Publish over FTP 1.9 which we use in almost every configuration is working fine ...

          deleting duplicate links because this is not related to FTP or SSH. Those plugins work fine saving credentials.

          David Brossard added a comment - deleting duplicate links because this is not related to FTP or SSH. Those plugins work fine saving credentials.

          I reproduce this issue when configures both Publish Over CIFS and Publish Over SSH on jenkins 1.518.
          And also this issue is not reproduced when configures only Publish Over CIFS.

          Taiki Sugawara added a comment - I reproduce this issue when configures both Publish Over CIFS and Publish Over SSH on jenkins 1.518. And also this issue is not reproduced when configures only Publish Over CIFS.

          Still present in version 1.520

          Ioannis Mavroukakis added a comment - Still present in version 1.520

          Kevin Burge added a comment - - edited

          FWIW, I have abandoned this plugin. We had an issue with even 1.503 (we're still on 1.503) where I could not deploy/connect to a particular Windows box no matter what I did, when smbclient had no problems at all. So, I resorted to using:

          smbclient -E -A ~/.cifs_credentials "$SHARE" -c 'prompt; recurse; mput mydir' 1>/dev/null

          While not as flexible as the CIFS plugin, it works. But, smbclient does not return an error if this command line fails (so the jenkins job succeeds). I have found no good way to make smbclient fail whenever there is a problem (like invalid credentials). One way I found to check for this is to try to put a file as a simple check (without mput):

          echo "xts-$BUILD_NUMBER" > xts.build
          smbclient -E -A ~/.cifs_credentials "$SHARE" -c 'put xts.build' 1>/dev/null
          ... continue with actual smbclient copy...

          This fails under a few tests I performed as I had hoped, but not all.

          SHARE is //system/share type share.
          ~/.cifs_credentials contains:
          cat ~/.cifs_credentials
          username=jenkins
          password=password
          domain=DOMAIN

          Kevin Burge added a comment - - edited FWIW, I have abandoned this plugin. We had an issue with even 1.503 (we're still on 1.503) where I could not deploy/connect to a particular Windows box no matter what I did, when smbclient had no problems at all. So, I resorted to using: smbclient -E -A ~/.cifs_credentials "$SHARE" -c 'prompt; recurse; mput mydir' 1>/dev/null While not as flexible as the CIFS plugin, it works. But, smbclient does not return an error if this command line fails (so the jenkins job succeeds). I have found no good way to make smbclient fail whenever there is a problem (like invalid credentials). One way I found to check for this is to try to put a file as a simple check (without mput): echo "xts-$BUILD_NUMBER" > xts.build smbclient -E -A ~/.cifs_credentials "$SHARE" -c 'put xts.build' 1>/dev/null ... continue with actual smbclient copy... This fails under a few tests I performed as I had hoped, but not all. SHARE is //system/share type share. ~/.cifs_credentials contains: cat ~/.cifs_credentials username=jenkins password=password domain=DOMAIN

          Ioannis Mavroukakis added a comment - - edited

          There was a fix described in another ticket, related to the FTP part of publish-over as described here https://github.com/afischer211/publish-over-ftp-plugin/blob/master/src/main/java/jenkins/plugins/publish_over_ftp/BapFtpPublisherPlugin.java . I've made the same changes in the publish-cifs plugin and it works. For anyone who's not comfortable with the source change, you can download the hpi here: http://dl.bintray.com/imavroukakis/generic/publish-over-cifs.hpi . It has also been compiled against a patched version of jifs to allow large file transfers.

          Ioannis Mavroukakis added a comment - - edited There was a fix described in another ticket, related to the FTP part of publish-over as described here https://github.com/afischer211/publish-over-ftp-plugin/blob/master/src/main/java/jenkins/plugins/publish_over_ftp/BapFtpPublisherPlugin.java . I've made the same changes in the publish-cifs plugin and it works. For anyone who's not comfortable with the source change, you can download the hpi here: http://dl.bintray.com/imavroukakis/generic/publish-over-cifs.hpi . It has also been compiled against a patched version of jifs to allow large file transfers.

          We are using Jenkins 1.516 and publish-over-cifs 0.2 without any problems.
          But after I installed publish-over-ssh 1.10 we also lost the CIFS shares config.

          Thank you very much Ioannis, your version did the job, everything is fine again.

          Can someone (bap?) do this changes in the main source tree?

          Florian Rosenauer added a comment - We are using Jenkins 1.516 and publish-over-cifs 0.2 without any problems. But after I installed publish-over-ssh 1.10 we also lost the CIFS shares config. Thank you very much Ioannis, your version did the job, everything is fine again. Can someone (bap?) do this changes in the main source tree?

          Had the same problem, updated to version 0.3 today and it seems to be fixed. I'd suggest you try it.

          Horia Constantin added a comment - Had the same problem, updated to version 0.3 today and it seems to be fixed. I'd suggest you try it.

          Alex Earl added a comment -

          Looks like this was fixed in 0.3

          Alex Earl added a comment - Looks like this was fixed in 0.3

          For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues

          Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/41
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-17112%22

          (Note: this is an automated bulk comment)

          Gavin McDonald added a comment - For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/41 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-17112%22 (Note: this is an automated bulk comment)

            slide_o_mix Alex Earl
            kcburge Kevin Burge
            Votes:
            4 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: