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

Publish over CIFS shares do not persist

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

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

        Attachments

          Issue Links

            Activity

            Hide
            kcburge 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

            Show
            kcburge 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
            Hide
            imavroukakis 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.

            Show
            imavroukakis 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.
            Hide
            skybird 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?

            Show
            skybird 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?
            Hide
            treaz 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.

            Show
            treaz 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.
            Hide
            slide_o_mix Alex Earl added a comment -

            Looks like this was fixed in 0.3

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

              People

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

                Dates

                Created:
                Updated:
                Resolved: