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

Support build variables (substitution variables) during command execution

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: ssh-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      This plugin doesn't seem to support build variables. Attached are three images showing:

      1. Build parameters for a job
      2. A build step of "Execute shell script on remote host using ssh"
      3. The resulting console output.

      You'll notice the variable is not substituted.

        Attachments

          Issue Links

            Activity

            Hide
            edmund_wagner edmund_wagner added a comment -

            fixed in plugin version 1.6

            Show
            edmund_wagner edmund_wagner added a comment - fixed in plugin version 1.6
            Hide
            mattboll Matthieu Bollot added a comment -

            Hi,
            I've got the exact same behaviour with ssh plugin version 2.4

            Show
            mattboll Matthieu Bollot added a comment - Hi, I've got the exact same behaviour with ssh plugin version 2.4
            Hide
            nikita_danilov Nikita Danilov added a comment - - edited

            Hello,
            We have the same issue with SSH plugin versions 2.4.

            In 1.6 version plugin translates script to the server like this:

            export MY_VAR="asd"
            echo $MY_VAR

            Variable value sent via export command. But unfortunately our server cannot to process complex scripts, server is awaiting just 1 command with N parameters.
            Is it possible to implement direct variables substition in script, without "export"?

            Show
            nikita_danilov Nikita Danilov added a comment - - edited Hello, We have the same issue with SSH plugin versions 2.4. In 1.6 version plugin translates script to the server like this: export MY_VAR= "asd" echo $MY_VAR Variable value sent via export command. But unfortunately our server cannot to process complex scripts, server is awaiting just 1 command with N parameters. Is it possible to implement direct variables substition in script, without "export"?
            Hide
            ljader Łukasz Jąder added a comment -

            Nikita Danilov you should report your issue as a separate ticket.

            The original issue has been fixed in SSH 2.5

            Show
            ljader Łukasz Jąder added a comment - Nikita Danilov you should report your issue as a separate ticket. The original issue has been fixed in SSH 2.5
            Hide
            ljader Łukasz Jąder added a comment -

            Closing - this has been fixed by exporting used env variables before the script.

            It works in recently released SSH 2.5.

            Show
            ljader Łukasz Jąder added a comment - Closing - this has been fixed by exporting used env variables before the script. It works in recently released SSH 2.5.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              leojhartiv leojhartiv
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: