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

[JobDSL plugin] Support buildDiscarder in organizationFolder

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • Jenkins version: 2.346.3
      JobDSL plugin version: 1.79

      Can you please add buildDiscarder in organizationFolder job type? I could do it in multibranchPipelineJob, but I didn’t find how to do it in organizationFolder (according to api-viewer). I need it to configure job execution retention in all of the child multibranches jobs.

      This is how I did for multibranchPipelineJob

      {{}}

      multibranchPipelineJob('my-job') {
          branchSources {
              branchSource {
                  strategy {
                      allBranchesSame {
                          props {
                              buildRetention {
                                  buildDiscarder {
                                      strategy {
                                          logRotator {
                                              daysToKeepStr('3')
                                              numToKeepStr('5')
                                              artifactDaysToKeepStr('3')
                                              artifactNumToKeepStr('5')
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      } 

      {{}}

            jamietanna Jamie Tanna
            galindro Bruno Galindro da Costa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: