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

Allow getting log through RunWrapper

    Details

    • Similar Issues:

      Description

      an example pipeline

      ...
      def myBuild = build ...
      ...
      

      `myBuild` ends up in as `org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper`.

      The way to get downstream build log would be by `myBuild.rawBuild...` but `rawBuild` is not whitelisted in the script security plugin. Also in the console where it can be allowed I see

      signature : method org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper getRawBuild Approving this signature may introduce a security vulnerability! You are advised to deny it.

      So my request is to allow somehow getting the downstream build log without security risks.

      Thank you!

        Attachments

          Issue Links

            Activity

            Hide
            akostadinov akostadinov added a comment -

            If log is available similar to how current build log is available through the `manager.getLogMatcher` that should also do the job. The main thing is to have ability to inspect the log of the downstream build.

            Show
            akostadinov akostadinov added a comment - If log is available similar to how current build log is available through the `manager.getLogMatcher` that should also do the job. The main thing is to have ability to inspect the log of the downstream build.
            Hide
            abayer Andrew Bayer added a comment -
            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/workflow-support-plugin/pull/51 adding myBuild.log .
            Hide
            palandor Brian M added a comment -

            Any update on this?

            The last update was on "2018-01-12 14:02"

            Show
            palandor Brian M added a comment - Any update on this? The last update was on "2018-01-12 14:02"
            Hide
            alan_czajkowski Alan Czajkowski added a comment -

            really need a mechanism to safely access the build log inside declarative pipelines ... any ETA on this?

            Show
            alan_czajkowski Alan Czajkowski added a comment - really need a mechanism to safely access the build log inside declarative pipelines ... any ETA on this?
            Hide
            dnusbaum Devin Nusbaum added a comment -

            I'm not sure about adding direct access to build logs from the Pipeline itself. We do not want to encourage users to process large amounts of data directly in their Pipelines, as that often leads to serious performance issues. It would be great to get some examples of what users are looking for in the downstream build logs (build results, errors, etc.). Maybe we could create/expose a different step for structured cross-build communications that could be used from Pipelines that would avoid the drawbacks of direct log access.

            Show
            dnusbaum Devin Nusbaum added a comment - I'm not sure about adding direct access to build logs from the Pipeline itself. We do not want to encourage users to process large amounts of data directly in their Pipelines, as that often leads to serious performance issues. It would be great to get some examples of what users are looking for in the downstream build logs (build results, errors, etc.). Maybe we could create/expose a different step for structured cross-build communications that could be used from Pipelines that would avoid the drawbacks of direct log access.

              People

              • Assignee:
                Unassigned
                Reporter:
                akostadinov akostadinov
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: