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

Scan Repository Trigger Periodically : configurable crontab (`spec`)

    XMLWordPrintable

Details

    Description

      Currently we can only choose a period, which is then used to define a crontab (https://github.com/jenkinsci/cloudbees-folder-plugin/blob/7e6294bc48d4cddc89c129ceaf1ab6d352462425/src/main/java/com/cloudbees/hudson/plugins/folder/computed/PeriodicFolderTrigger.java#L117).

      For example: 1 day period => `H H 0 0 0` crontab:

      ```

      <triggers>
      <com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.4">
      <spec>H H * * *</spec>
      <interval>86400000</interval>
      </com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
      </triggers>

      ```

       

      Feature request: Make `spec`/crontab configurable via GUI.

      Goal: re-scan only at night, because it can trigger a lot of builds, filling Jenkins build queue.

      Scenario:

      • Lots of pending PR on github
      • Jenkins config: build PR by merging target branch first
      • New commits on target branch

      => an automatic re-scan mid-day triggers a re-build of all pending PR, saturating the Jenkins cluster for may hours.

       

      What I tried:

      Manually edit the `config.xml` file, reloading the config from disk on Jenkins: Modification gets lost on next GUI save, overwritten by a static value determined from period.

      Attachments

        Activity

          thomas_deepomatic Thomas Riccardi created issue -
          abdennour Abdennour Toumi added a comment - - edited

          we had similar issue. However, it was disaster for us because we had 197 organization folders 

          Jenkins consumes more than 24 Go RAM !!! and want more.

          Really, this is a big problem 
          triggers>com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>spec> : must be set using seed job or UI
           
           

          abdennour Abdennour Toumi added a comment - - edited we had similar issue. However, it was disaster for us because we had 197 organization folders  Jenkins consumes more than 24 Go RAM !!! and want more. Really, this is a big problem  triggers>com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>spec> : must be set using seed job or UI    

          Especially in case of indexing takes a long time and maintenance-timeslots are defined. #voteup

          zioschild Sven Appenrodt added a comment - Especially in case of indexing takes a long time and maintenance-timeslots are defined. #voteup
          dnusbaum Devin Nusbaum made changes -
          Field Original Value New Value
          Assignee Devin Nusbaum [ dnusbaum ]
          yodadacoda William added a comment -

          With ~30 open PRs and each taking 30-45 minutes to build, the build queue is full for an entire day which is a real pain point when Jenkins does its re-scan at ~8.30am Monday morning. (multiple executors are useless in our particular environment)

          yodadacoda William added a comment - With ~30 open PRs and each taking 30-45 minutes to build, the build queue is full for an entire day which is a real pain point when Jenkins does its re-scan at ~8.30am Monday morning. (multiple executors are useless in our particular environment)

          People

            Unassigned Unassigned
            thomas_deepomatic Thomas Riccardi
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: