---
- project:
    name: Osmocom-repo-install
    jobs:
      - Osmocom-repo-install-{distro}
    distro:
      - debian10:
          feeds: !!python/tuple [nightly, latest]
      - debian11:
          feeds: !!python/tuple [nightly, latest]
      - debian12:
          feeds: !!python/tuple [nightly, latest]
      - debian13:
          feeds: !!python/tuple [nightly, latest]

- job-template:
    name: Osmocom-repo-install-{distro}
    project-type: matrix
    defaults: global
    description: |
        Install {distro} packages from the
          <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages">
            Osmocom binary packages repositories</a>, test if binaries and systemd services can be started.<br>
        <br>
        Related:<br>
        <ul>
          <li> <a href="https://osmocom.org/issues/3176">OS#3176</a>: install all Osmocom debian packages
          <li> <a href="https://osmocom.org/issues/3369">OS#3369</a>: check if systemd services start properly
          <li> <a href="https://osmocom.org/issues/4563">OS#4563</a>: extend for centos
          <li> <a href="https://osmocom.org/issues/5365">OS#5365</a>: run in qemu
        </ul>
    properties:
      - build-discarder:
          days-to-keep: 30
          num-to-keep: 30
    parameters:
      - string:
          name: BRANCH_CI
          description: |
                osmo-ci.git branch
          default: 'master'
      - string:
          name: EMAIL_NOTIFICATIONS
          description: For failed build notifications, set to empty to disable
          default: 'jenkins-notifications@lists.osmocom.org'
    axes:
      - axis:
          type: slave
          name: label
          values: !!python/tuple [qemu]
      - axis:
          type: user-defined
          name: feed
          values: '{obj:feeds}'
    builders:
      - shell: |
          export FEED="$feed"
          scripts/repo-install-test.sh "{distro}"
    scm:
      - git:
          branches:
            - '$BRANCH_CI'
          url: https://gerrit.osmocom.org/osmo-ci
          git-config-name: 'Jenkins Builder'
          git-config-email: 'jenkins@osmocom.org'
    triggers:
      - timed: "H 06 * * *"

    publishers:
      - email:
          notify-every-unstable-build: true
          recipients: '$EMAIL_NOTIFICATIONS'

# vim: expandtab tabstop=2 shiftwidth=2
