- job:
    name: update-osmo-ci-on-slaves
    project-type: matrix
    axes:
      - axis:
          type: slave
          name: label
          values:
            - build4-deb12build-ansible
            - build5-deb12build-ansible
            - gtp0-deb10fr
            - lx2-raspbian11build-ansible
            - rpi4-raspbian12build-ansible-1
            - rpi4-raspbian12build-ansible-2
            - rpi4-raspbian12build-ansible-3
            - simtester
    properties:
      - build-discarder:
          days-to-keep: 30
          num-to-keep: 120
    parameters:
      - string:
          name: OSMO_BRANCH_CI
          description: |
                osmo-ci.git branch
          default: 'master'
      - string:
          # Used in scripts/common.sh:docker_images_require()
          name: OSMO_BRANCH_DOCKER_PLAYGROUND
          description: |
                docker-playground.git branch
          default: 'master'
    scm:
      - git:
          url: https://gerrit.osmocom.org/osmo-ci
          git-config-name: 'Jenkins Builder'
          git-config-email: 'jenkins@osmocom.org'
          skip-tag: true
          branches:
            - '$OSMO_BRANCH_CI'
          wipe-workspace: true

    triggers:
      - pollscm:
          cron: "H/5 * * * *"
          ignore-post-commit-hooks: false
      - timed: "H H * * *"

    builders:
      - shell: './contrib/jenkins.sh'

    wrappers:
    - ansicolor:
        colormap: xterm

    description: |
      <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b>

    publishers:
      - email:
          recipients: jenkins-notifications@lists.osmocom.org

# Trigger from docker-playground.git too
- job:
    name: update-osmo-ci-on-slaves-dp
    description: |
      Trigger <a href="https://jenkins.osmocom.org/jenkins/job/update-osmo-ci-on-slaves/">update-osmo-ci-on-slaves</a>
      on changes in docker-playground.git, so it can rebuild docker containers relevant for the jenkins slaves.
    scm:
      - git:
          url: https://gerrit.osmocom.org/docker-playground
          git-config-name: 'Jenkins Builder'
          git-config-email: 'jenkins@osmocom.org'
          skip-tag: true
          branches:
            - 'origin/master'
    triggers:
      - pollscm:
          cron: "H/5 * * * *"
          ignore-post-commit-hooks: false
    publishers:
      - trigger:
          project: "update-osmo-ci-on-slaves"


# vim: expandtab tabstop=2 shiftwidth=2