--- /dev/null
+---
+
+- defaults:
+ name: linux-kernel
+ description: |
+ <p>Job is managed by Jenkins Job Builder</p>
+ # As the source code doesn't contain a Jenkinsfile, multibranch pipelines don't work
+ project-type: pipeline
+ sandbox: true
+ dsl:
+ !include-jinja2: pipelines/linux/pipeline.groovy.j2
+ # Vars used by pipeline and/or projects
+ cc: 'gcc'
+ cxx: 'g++'
+ github_user: ''
+ github_project: 'linux'
+ github_branch_pattern: 'ci/*'
+ stable_mirror: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
+ email_to: ''
+ default_label: 'deb12-amd64'
+
+## Anchors
+
+## Job templates
+
+- job-template:
+ name: '{job_prefix}linux_kernel_pipeline'
+ defaults: linux-kernel
+
+- job-template:
+ name: '{job_prefix}branch_watcher'
+ dsl:
+ !include-jinja2: pipelines/linux/watcher.groovy.j2
+## Views
+
+- view-template:
+ name: 'Linux Kernel'
+ view-type: list
+ regex: '.*[-_]?linux_kernel[-_].*'
+
+## Projects
+
+- project:
+ name: 'compudj'
+ job_prefix: 'dev_compudj_'
+ email_to: 'mathieu.desnoyers@efficios.com'
+ github_user: 'compudj'
+ jobs:
+ - '{job_prefix}linux_kernel_pipeline':
+ github_project: 'linux-dev'
+ - '{job_prefix}linux_kernel_pipeline':
+ job_prefix: 'dev_kstewart'
+ github_user: 'kienanstewart'
+ email_to: ''
+
+- project:
+ name: linux-views
+ views:
+ - 'Linux Kernel'
--- /dev/null
+pipeline {
+ agent none
+
+ options {
+ skipDefaultCheckout(true)
+ buildDiscarder(logRotator(daysToKeepStr: '7'))
+ }
+
+ triggers {
+ pollSCM('H * * * *')
+ }
+
+ stages {
+ stage('Checkout') {
+ agent {
+ label "{{default_label}}"
+ }
+
+ steps {
+ dir('src/linux') {
+ checkout([
+ $class: 'GitSCM',
+ branches: [[name: '{{github_branch_pattern}}']],
+ userRemoteConfigs: [[
+ url: 'https://github.com/{{github_user}}/{{github_project}}'
+ ]],
+ extensions: [
+ [$class: 'CloneOption', depth: 1,],
+ [$class: 'CleanCheckout'],
+ ],
+ ])
+
+ // Do any steps that are pretty generic, like linting or check
+ // project config.
+ // The '.git' won't be stashed, so any operations that depend
+ // on git information should be done now.
+ sh (
+ label: 'Check patch',
+ script: """\n
+git remote add stable {{stable_mirror}}
+git fetch stable
+git branch -u stable/master
+OUTPUT_DIR=\$(mktemp -d)
+FAILURE=0
+for patch_file in "\$(ls "\$OUTPUT_DIR/*.patch")" ; do
+ echo \$patch_file
+ cat \$patch_file | scripts/checkpatch.pl -q --terse --no-summary --mailback --showfile || FAILURE=1
+done
+rm -rf "\${OUTPUT_DIR}"
+if [[ "\${FAILURE}" == "1" ]] ; then
+ exit 1
+fi
+""",
+ )
+ }
+
+
+ stash(name: 'linux', includes: 'src/linux/**')
+ }
+ }
+
+ // parallel (arch) {
+
+ // }
+
+ // Future: parallel (arch, platform) runtime tests
+ }
+}