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

[RFE] keep build forever - expose for current build and allow in sandbox

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      as discussed on https://groups.google.com/forum/#!topic/jenkinsci-users/uTqSTRWC3M0

      currentBuild.rawBuild.keepLog(true) requires sandbox script approval.

      Should probably be exposed for 'currentBuild' and allowed in the sandbox.

        Attachments

          Issue Links

            Activity

            Hide
            rompic Roman Pickl added a comment -

            nice!

            Show
            rompic Roman Pickl added a comment - nice!
            Hide
            romanp Roman Pickl added a comment -

            any new hints on this one?

            Show
            romanp Roman Pickl added a comment - any new hints on this one?
            Hide
            romanp Roman Pickl added a comment -

            any updates on this one?

            Show
            romanp Roman Pickl added a comment - any updates on this one?
            Hide
            mlasevich Michael Lasevich added a comment -

            +1
            Would be nice to have this available directly and properly, however there is a simple (in some cases) workaround - External Global Libraries. Since those are run outside the sandbox, you can simply write a small wrapper in an external lib like this:

            // vars/KeepBuild.groovy inside external shared library
            def call(boolean keep = true){
            	currentBuild.rawBuild.keepLog(keep)
            }
            

            Of course if you are not already using/needing external libs, this is a bit of a headache

            -M

            Show
            mlasevich Michael Lasevich added a comment - +1 Would be nice to have this available directly and properly, however there is a simple (in some cases) workaround - External Global Libraries. Since those are run outside the sandbox, you can simply write a small wrapper in an external lib like this: // vars/KeepBuild.groovy inside external shared library def call( boolean keep = true ){ currentBuild.rawBuild.keepLog(keep) } Of course if you are not already using/needing external libs, this is a bit of a headache -M

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                romanp Roman Pickl
              • Votes:
                10 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: