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

Ability to "Keep this build forever" from Pipeline DSL

    XMLWordPrintable

Details

    Description

      I would love to be able to "Keep this build forever" from pipeline DSL syntax. Currently this is not available via currentBuild (or http://javadoc.jenkins.io/plugin/workflow-support/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.html respectively).

      A workaround is to use currentBuild.rawBuild.keepLog(), but this requires adding two security exceptions, one of them being critical...

      Simply exposing keepLog(boolean) via the RunWrapper would solve it imho

      Attachments

        Issue Links

          Activity

            tknerr Torben Knerr added a comment - created PR 52 to fix that: https://github.com/jenkinsci/workflow-support-plugin/pull/52

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java
            http://jenkins-ci.org/commit/workflow-support-plugin/385508e128fcc1ae2d10d99b7b089510012ec639
            Log:
            Merge pull request #52 from tknerr/whitelist-keeplog-property

            Whitelist the isKeepLog and setKeepLog properties (JENKINS-49014)

            Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/d1e2e2bfc467...385508e128fc

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/RunWrapper.java http://jenkins-ci.org/commit/workflow-support-plugin/385508e128fcc1ae2d10d99b7b089510012ec639 Log: Merge pull request #52 from tknerr/whitelist-keeplog-property Whitelist the isKeepLog and setKeepLog properties ( JENKINS-49014 ) Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/d1e2e2bfc467...385508e128fc

            Should the documentation ("Pipeline Syntax" >> "Global Variables Reference") mention this as well? Like:

            reinholdfuereder Reinhold Füreder added a comment - Should the documentation ("Pipeline Syntax" >> "Global Variables Reference") mention this as well? Like:

            People

              Unassigned Unassigned
              tknerr Torben Knerr
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: