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

Syntax differs from "sh" call regarding shebang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • labelled-steps-plugin
    • None
    • jenkinsci/blueocean
      labelled-pipeline-steps 1.0

      When using the labelledSteps plugin, I have part of my script which takes advantage of bash. In the unlabelled "sh" commands, I could do the following:

      sh '''

      #!/bin/bash

      set -o pipefail

      <code dependent on pipefail>

      '''

      With labelledShell, this type of shebang notation doesn't work:

      labelledShell label: 'my bash', script: """

      #!/bin/bash

      set -o pipefail

      <code dependent on pipefail>

      """

            vickychijwani Vicky Chijwani
            zlacelle Zach LaCelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: