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

Do not output the "Evaluated Groovy script" to console

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The contents of the "Evaluated Groovy script" are printed to the Console of every build.

      This only clutters the Console output and is very confusing for our users. Can it be disabled?

        Attachments

          Activity

          Hide
          teljj001 James Telfer added a comment -

          IMO, this distracts from the information that I generally want to get from the build log, so I'd like this behaviour to be changed too. However, I understand that this might be helpful for some to know what script is being executed.

          I would like to change the plugin to accommodate this change, but I'd like to know what kind of solution would be acceptable.

          As I see it, there are a few options:

          1. Don't log the script at all, just log that the inline Groovy script is being executed.
          2. Log the first line of the script
          3. Log the first `n` characters of the script, followed by an ellipsis
          4. Log the first comment line from the script.

          Honestly, I think (1) is the better option, as I don't see much utility in logging the entire script. I'd welcome a response though, and I'll look to put a pull request together for the agreed fix.

          Show
          teljj001 James Telfer added a comment - IMO, this distracts from the information that I generally want to get from the build log, so I'd like this behaviour to be changed too. However, I understand that this might be helpful for some to know what script is being executed. I would like to change the plugin to accommodate this change, but I'd like to know what kind of solution would be acceptable. As I see it, there are a few options: Don't log the script at all, just log that the inline Groovy script is being executed. Log the first line of the script Log the first `n` characters of the script, followed by an ellipsis Log the first comment line from the script. Honestly, I think (1) is the better option, as I don't see much utility in logging the entire script. I'd welcome a response though, and I'll look to put a pull request together for the agreed fix.
          Hide
          deepchip Martin d'Anjou added a comment -

          James Telfer, if you know how to fix this, IMO you should just do it. The script does not belong to the console at all. Users are not supposed to see configuration details, but this plugin just leaks it to the console. This must be a debug feature left over by the original design. Just take it out entirely.

          Show
          deepchip Martin d'Anjou added a comment - James Telfer , if you know how to fix this, IMO you should just do it. The script does not belong to the console at all. Users are not supposed to see configuration details, but this plugin just leaks it to the console. This must be a debug feature left over by the original design. Just take it out entirely.
          Hide
          teljj001 James Telfer added a comment -

          Submitted as pull request 71.

          Show
          teljj001 James Telfer added a comment - Submitted as pull request 71 .
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: James Telfer
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java
          http://jenkins-ci.org/commit/envinject-plugin/7b93cf484ee3d106833c9ba592fd41158b343665
          Log:
          Fixes JENKINS-23274: remove log of script content

          Avoids the script content appearing in the build output. Script execution is logged, but not the content of script.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: James Telfer Path: src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java http://jenkins-ci.org/commit/envinject-plugin/7b93cf484ee3d106833c9ba592fd41158b343665 Log: Fixes JENKINS-23274 : remove log of script content Avoids the script content appearing in the build output. Script execution is logged, but not the content of script.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java
          http://jenkins-ci.org/commit/envinject-plugin/61417c784c657553fd9d2f37dbf9996ce440879a
          Log:
          Merge pull request #71 from jamestelfer/patch-1

          Fixes JENKINS-23274: remove log of script content

          Compare: https://github.com/jenkinsci/envinject-plugin/compare/e4a161807e6b...61417c784c65

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/org/jenkinsci/plugins/envinject/service/EnvInjectEnvVars.java http://jenkins-ci.org/commit/envinject-plugin/61417c784c657553fd9d2f37dbf9996ce440879a Log: Merge pull request #71 from jamestelfer/patch-1 Fixes JENKINS-23274 : remove log of script content Compare: https://github.com/jenkinsci/envinject-plugin/compare/e4a161807e6b...61417c784c65
          Hide
          pixman20 pixman20 added a comment -

          It looks like this was merged, but never released.
          Can another release be made so this can be used?

          Show
          pixman20 pixman20 added a comment - It looks like this was merged, but never released. Can another release be made so this can be used?
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Should be released soon

          Show
          oleg_nenashev Oleg Nenashev added a comment - Should be released soon
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Released in 1.93

          Show
          oleg_nenashev Oleg Nenashev added a comment - Released in 1.93

            People

            • Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              marc_guenther Marc G√ľnther
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: