- project:
    name: gerrit-dahdi-linux
    linux-repo-branch:
      - "torvalds-master"
      - "stable-linux-4.19.y"
      - "stable-linux-5.10.y"
      - "stable-linux-6.1.y"
      - "stable-linux-6.12.y"
      - "stable-linux-rolling-stable"
    jobs:
      - 'gerrit-dahdi-linux-{linux-repo-branch}'

- job-template:
    name: 'gerrit-dahdi-linux-{linux-repo-branch}'
    project-type: freestyle
    node: linux-shallow-clone
    concurrent: true
    properties:
      - build-discarder:
          days-to-keep: 30
          num-to-keep: 120
    description: |
      Pending gerrit code reviews of
      <a href="https://gerrit.osmocom.org/#/q/status:open+project:dahdi-linux">dahdi-linux</a>
      built against linux {linux-repo-branch}
      (<a href="https://osmocom.org/issues/5407">OS#5407</a>)
      <br/><br/>
      <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b>

    scm:
      - git:
         url: 'https://gerrit.osmocom.org/dahdi-linux'
         branches:
           - '$GERRIT_BRANCH'
         refspec: '$GERRIT_REFSPEC'
         choosing-strategy: gerrit
         wipe-workspace: true

    triggers:
      - gerrit:
          trigger-on:
            - patchset-created-event:
                exclude-drafts: true
                exclude-no-code-change: true
          projects:
            - project-compare-type: 'PLAIN'
              project-pattern: 'dahdi-linux'
              branches:
                - branch-compare-type: 'ANT'
                  branch-pattern: '**'
          skip-vote:
              successful: false
              failed: false
              unstable: false
              notbuilt: false
          silent: false
          escape-quotes: false
          server-name: gerrit.osmocom.org

    builders:
      - shell: |
          docker run \
            --rm=true \
            -e "KSRC=/linux" \
            -v "$PWD:/build" \
            -v "$HOME/linux.git:/linux.git:ro" \
            "$USER/debian-bookworm-build" \
            sh -e -x -c "
              git config --global --add safe.directory /linux.git
              git -C /linux.git -c color.ui=always log -1 --oneline {linux-repo-branch}
              git clone -q /linux.git -b {linux-repo-branch} /linux
              chown -R build:build /linux
              timeout 10m su build -c /build/contrib/jenkins.sh
            "

    wrappers:
    - ansicolor:
        colormap: xterm

    publishers:
       - warnings:
           console-log-parsers:
             - 'GNU C Compiler 4 (gcc)'
           resolve-relative-paths: true

# vim: expandtab tabstop=2 shiftwidth=2
