- defaults:
    name: self-maintenance
    description: 'Cleanup and monitor so that there is a predictable environment.{do_not_edit}'
    logrotate:
      daysToKeep: 90
      numToKeep: 30
      artifactDaysToKeep: -1
      artifactNumToKeep: -1
    triggers:
      - timed: "30 6 * * *"
    builders:
      - shell: '{my_shell}'
    publishers:
      - email:
          recipients: 'qa-jenkins-scm@lists.alioth.debian.org'
    properties:
      - sidebar:
          url: https://jenkins.debian.net/userContent/about.html
          text: About jenkins.debian.net
          icon: /userContent/images/debian-swirl-24x24.png
      - sidebar:
          url: https://jenkins.debian.net/view/jenkins.d.n/
          text: All jenkins.d.n jobs
          icon: /userContent/images/debian-jenkins-24x24.png
      - sidebar:
          url: http://www.profitbricks.co.uk
          text: Sponsored by Profitbricks
          icon: /userContent/images/profitbricks-24x24.png
      - priority:
          job-prio: '125'

- job-template:
    defaults: self-maintenance
    name: '{name}_maintenance'
    publishers:
      - logparser:
          parse-rules: '/srv/jenkins/logparse/debian.rules'
          unstable-on-warning: 'true'
          fail-on-error: 'true'

- job-template:
    defaults: self-maintenance
    name: '{name}_sub-maintenance'
    defaults: self-maintenance
    name: '{name}_sub-maintenance-squid'
    defaults: self-maintenance
    name: 'rebootstrap_maintenance'

- project:
    name: self
    do_not_edit: '<br><br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/job-cfg/self.yaml">self.yaml</a>.'
    jobs:
      - '{name}_maintenance':
         my_shell: '/srv/jenkins/bin/maintenance.sh'
      - '{name}_sub-maintenance-squid':
         my_shell: '/srv/jenkins/bin/maintenance.sh squid'
      - 'rebootstrap_maintenance':
         my_shell: '/srv/jenkins/bin/maintenance.sh rebootstrap'