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

Label is showing sh script's content instead of "Shell script"

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-cps-plugin

      Hello,

      Since the update of Jenkins (2.235.3 LTS) and Pipeline: Nodes and Processes (workflow-durable-task-step) plugin 2.35 to Jenkins (2.2249.3 LTS) and Pipeline: Nodes and Processes (workflow-durable-task-step) plugin 2.36

      I have a different behaviour with label of sh steps in Blue Ocean

      Before update label was "Shell Script" :

      After update the label is composed by a description and a name, the sh script's content is displayed in the description and the label name is "Shell script" :

      I tried to use label: 'Hide me' in my sh step but It will change only the label name "Shell script" and not the label description (sh script's content)

      I think this behaviour is not normal, maybe due to PR 121 in 2.36 version ?

      Please it is possible to fix it or propose an option to choose if we want "Shell script" or sh script's content ?

      Thanks,

      Best regards,

      Steven

          [JENKINS-64238] Label is showing sh script's content instead of "Shell script"

          Carroll Chiou added a comment - - edited

          This actually might be an issue with the release of workflow-cps 2.85.  Can you go to the build page and see if there are any warnings for groovy string interpolation?

          Update: you can also click on the shell scripts in Blue Ocean and there will most like be a warning for groovy string interpolation.

          Also, just to clarify, I see you have redacted some parts in the shell script, but are there any exposed secrets? I don't mean the variable names, but the actual variable values.

          Carroll Chiou added a comment - - edited This actually might be an issue with the release of workflow-cps 2.85.  Can you go to the build page and see if there are any warnings for groovy string interpolation? Update: you can also click on the shell scripts in Blue Ocean and there will most like be a warning for groovy string interpolation. Also, just to clarify, I see you have redacted some parts in the shell script, but are there any exposed secrets? I don't mean the variable names, but the actual variable values.

          DeadlockState added a comment -

          Hello carroll

          Sorry for the delay of my response

          I've no Groovy string interpolation. I use triple double-quotes for my sh step but my sensitives credentials variables are dollar sign backslashed

          Exemple :

          sh """
             ./API_endpoint_connection.sh svc_account \$PASSWORD
          """

          Nope no secrets are exposed in the Shell scripts

          But I stil have to hide the script's content (like it was before)

          DeadlockState added a comment - Hello carroll Sorry for the delay of my response I've no Groovy string interpolation. I use triple double-quotes for my sh step but my sensitives credentials variables are dollar sign backslashed Exemple : sh """ ./API_endpoint_connection.sh svc_account \$PASSWORD """ Nope no secrets are exposed in the Shell scripts But I stil have to hide the script's content (like it was before)

          We are in the same boat with this issue.

          We haven't upgraded our instance since October 2020, which it has sat at Jenkins 2.249.2 until late last week, 26.08.2021. Before upgrading to the new LTS we have upgraded all the available plugins at the time and immediately noticed that she'll step labelling is broken. We have parked the LTS upgrade before the issue is resolved as it impedes visibility and clarity in the pipelines.

          In Blueocen stage view the entire step script block contents (as much as can fit across your screen in the step) precede the actual step label (coloured in grey now), which is separated by a hyphen and ists at the tail end of the step section, exactly like pictures in the issue show.

          In the classic stage view, the step label is at the beginning of the step, followed by the script contents, again, as much code as fits across the screen. The step labelling seems to be still preserved when looking at pipeline step execution in classic view, where log for each named step can be seen.

          Overall, the stages have become very cluttered and hard to read. Appreciate any pointers as to how to address this problem.

          Dmitry Seryogin added a comment - We are in the same boat with this issue. We haven't upgraded our instance since October 2020, which it has sat at Jenkins 2.249.2 until late last week, 26.08.2021. Before upgrading to the new LTS we have upgraded all the available plugins at the time and immediately noticed that she'll step labelling is broken. We have parked the LTS upgrade before the issue is resolved as it impedes visibility and clarity in the pipelines. In Blueocen stage view the entire step script block contents (as much as can fit across your screen in the step) precede the actual step label (coloured in grey now), which is separated by a hyphen and ists at the tail end of the step section, exactly like pictures in the issue show. In the classic stage view, the step label is at the beginning of the step, followed by the script contents, again, as much code as fits across the screen. The step labelling seems to be still preserved when looking at pipeline step execution in classic view, where log for each named step can be seen. Overall, the stages have become very cluttered and hard to read. Appreciate any pointers as to how to address this problem.

          Carroll Chiou added a comment -

          This is actually the intended behavior as the improved handling of secrets via `workflow-cps` allowed Jenkins to hide only the secrets and allow the script itself to be viewed. If the secrets were being exposed, then that would be a different issue.

          Carroll Chiou added a comment - This is actually the intended behavior as the improved handling of secrets via `workflow-cps` allowed Jenkins to hide only the secrets and allow the script itself to be viewed. If the secrets were being exposed, then that would be a different issue.

            Unassigned Unassigned
            DeadlockState DeadlockState
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: