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

Publish Over SSH plugin: shebang is fully ignored

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • None
    • Ubuntu-14.04, docker 1.12.1, docker image: jenkins:latest (jenkins 2.7.2), publish-over-ssh 1.14

      Hello,

      I'm using latest version of Jenkins from official docker repo. And currently it's not possible to execute a code in the bash shell. It always executes in /bin/sh instead (which in Ubuntu is a link to dash shell).

      The following code give me - "/bin/sh".

      #!/bin/bash
      echo ${SHELL}
      

      I have tested the same project (a simple freestyle job) on Jenkins 1.65x and it works fine.

          [JENKINS-37726] Publish Over SSH plugin: shebang is fully ignored

          Any updates?

          Alex Domoradov added a comment - Any updates?

          Alex Earl added a comment -

          The commands that you are executing are not run under the shell, it's like the commands are being executed as if you typed them one by one. If you want to do this, you would need to copy the shell script over to the server, then you could do /bin/bash yourfile.sh. This is different from the sh step for instance, where a shell script is created and then executed.

          Alex Earl added a comment - The commands that you are executing are not run under the shell, it's like the commands are being executed as if you typed them one by one. If you want to do this, you would need to copy the shell script over to the server, then you could do /bin/bash yourfile.sh. This is different from the sh step for instance, where a shell script is created and then executed.

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

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

          (Note: this is an automated bulk comment)

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

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

              Created:
              Updated:
              Resolved: