- defaults:
    name: haskell-package-plan
    project-type: freestyle
    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/haskell/
          text: Haskell packages metadata consistency
          icon: /userContent/images/debian-jenkins-24x24.png
      - sidebar:
          url: http://www.profitbricks.co.uk
          text: Sponsored by Profitbricks
          icon: /userContent/images/profitbricks-24x24.png
    description: '{my_description}{do_not_edit}'
    logrotate:
      daysToKeep: 365
      numToKeep: 365
      artifactDaysToKeep: -1
      artifactNumToKeep: -1
    builders:
      - shell: '/srv/jenkins/bin/chroot-run.sh {my_distro} "apt-get --no-install-recommends -y install {my_pkgs}; {my_shell}"'
    publishers:
      - logparser:
          parse-rules: '/srv/jenkins/logparse/haskell-package-plan.rules'
          unstable-on-warning: 'false'
          fail-on-error: 'false'
      - email:
          recipients: '{my_recipients}'
      - plot:
          - title: Stats
            yaxis: Packages
            group: PlotGroup
            csv-file-name: package-plan-stats.csv
            series:
                - file: stats.csv
                  format: csv
                  # inclusion-flag: exclude-by-string
                  # exclude: total
          #- title: Totals
          #  yaxis: Packages
          #  group: PlotGroup
          #  style: area
          #  series:
          #      - file: stats.csv
          #        format: csv
          #        # inclusion-flag: include-by-string
          #        # exclude: total
    scm:
      - git:
          url: 'git://anonscm.debian.org/pkg-haskell/package-plan.git'
          branches:
            - master

- job-template:
    defaults: haskell-package-plan
    name: '{name}'
    triggers:
      - pollscm: '*/6 * * * *'
      - timed: '0 16 * * *'    # every day at 16:00 UTC

- project:
    name: haskell-package-plan
    do_not_edit: '<br><br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/tree/job-cfg/haskell-package-plan.yaml">haskell-package-plan.yaml</a>.'
    jobs:
        - '{name}':
            my_distro: 'sid'
            my_pkgs: 'cabal-install ghc dctrl-tools patchutils libtext-patch-perl libfile-slurp-perl  libipc-run-perl liblist-moreutils-perl libdpkg-perl'
            my_shell: 'export http_proxy=http://localhost:3128; cabal update ; ./test-packages.pl'
            my_description: 'Haskell Metadata sanity checks'
            my_recipients: 'jenkins+debian-haskell qa-jenkins-scm@lists.alioth.debian.org pkg-haskell-maintainers@lists.alioth.debian.org'