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

Assumes default shell is bourne shell or bash and can not set jenkins environment varaibles if another shell

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ssh-plugin
    • linux, 64bit, SLED 11, tcsh shell.

      I have an issue. It seems that the SSH plugin presumes that the shell is bourne shell? However, in my case it is actually tcsh and this is causing some problems.

      I am interested in some of the jenkins environment variables such as NODE_NAME, and this plugin is smart enough to know that (because I am referencing to this environment variable in the build section of the plugin in order to navigate to a directory on the slave). So it will set the jenkins specific environment variable before the shell scripts and such in the build section are executed. Sounds good so far. However, it tries to do an export NODE_NAME = ${NODE_NAME} and of course it fails as this is not recognized in tcsh. It should have been setenv NODE_NAME ${NODE_NAME}

      . Could you update plugin and check what type of shell is default and then set up the environment variables accordingly.

      Example output:

      executing script:
      export NODE_NAME="lab54"

      cd /view/shma_jenkins_${NODE_NAME}/vobs/pxxx/pap_pop_aha_tst/aztec_common_scripts
      ./build
      export: Command not found.
      NODE_NAME: Undefined variable.
      ./build: Command not found.
      [SSH] exit-status: 1
      Build step 'Execute shell script on remote host using ssh' marked build as failure
      Terminating xvnc.
      $ vncserver -kill :11
      Killing Xvnc process ID 26889
      Finished: FAILURE

            edmund_wagner edmund_wagner
            shamanmahmoudi Shaman Mahmoudi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: