[JobDSL plugin] Support buildDiscarder in organizationFolder

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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')
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  }
              }
          }
      } 

      {{}}

            Assignee:
            Jamie Tanna
            Reporter:
            Bruno Galindro da Costa
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: