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

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

    XMLWordPrintable

Details

    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

            +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

            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
            romanp Roman Pickl added a comment -

            any updates on this one?

            romanp Roman Pickl added a comment - any updates on this one?
            romanp Roman Pickl added a comment -

            any new hints on this one?

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

            nice!

            rompic Roman Pickl added a comment - nice!

            People

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

              Dates

                Created:
                Updated:
                Resolved: