jjb: lttng-modules: Add ubuntu focal job
[lttng-ci.git] / jobs / lttng-modules.yaml
index 30622329cc86aaa8f93813cb865453633ac6eac6..0d99488ee6a0dbf2c41e2633bd6d8735d2fa7626 100644 (file)
 ---
+## Anchors
+- lttng-modules_build_parameters_defaults: &lttng-modules_build_parameters_defaults
+    name: 'lttng-modules_build_parameters_defaults'
+    parameters:
+      - string:
+          name: 'mversion'
+          default: '{mversion}'
+          description: 'The lttng-modules branch to build.'
+      - string:
+          name: 'maxConcurrentBuild'
+          default: '20'
+          description: 'The maximum number of concurrent child build to run.'
+      - string:
+          name: 'kverfloor'
+          default: '{kverfloor}'
+          description: 'The lowest kernel version to build.'
+      - string:
+          name: 'kverceil'
+          default: '{kverceil}'
+          description: 'The highest kernel version to build. (excluded)'
+      - string:
+          name: 'kverfilter'
+          default: '{kverfilter}'
+          description: 'Kernel versions list filtering strategy.'
+      - string:
+          name: 'kgitrepo'
+          default: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
+          description: 'The linux kernel git repository url.'
+      - string:
+          name: 'kbuildjob'
+          default: 'lttng-modules_PARAM_{parambuildtype}'
+          description: 'The parametrized job to use for child builds.'
+
+- lttng-modules_build_parameters_ubuntu: &lttng-modules_build_parameters_ubuntu
+    name: 'lttng-modules_build_parameters_ubuntu'
+    parameters:
+      - string:
+          name: 'mversion'
+          default: '{mversion}'
+          description: 'The lttng-modules branch to build.'
+      - string:
+          name: 'maxConcurrentBuild'
+          default: '20'
+          description: 'The maximum number of concurrent child build to run.'
+      - string:
+          name: 'kverfloor'
+          default: '{kverfloor}'
+          description: 'The lowest kernel version to build.'
+      - string:
+          name: 'kverceil'
+          default: '{kverceil}'
+          description: 'The highest kernel version to build. (excluded)'
+      - string:
+          name: 'kverfilter'
+          default: '{kverfilter}'
+          description: 'Kernel versions list filtering strategy.'
+      - string:
+          name: 'kgitrepo'
+          default: 'git://git-mirror.internal.efficios.com/git/ubuntu-{uversion}.git'
+          description: 'The linux kernel git repository url.'
+      - string:
+          name: 'kbuildjob'
+          default: 'lttng-modules_PARAM_{parambuildtype}'
+          description: 'The parametrized job to use for child builds.'
+      - string:
+          name: 'uversion'
+          default: '{uversion}'
+          description: 'The lowest kernel version to build.'
+
+- lttng-modules_build_parameters_rt: &lttng-modules_build_parameters_rt
+    name: 'lttng-modules_build_parameters_rt'
+    parameters:
+      - string:
+          name: 'mversion'
+          default: '{mversion}'
+          description: 'The lttng-modules branch to build.'
+      - string:
+          name: 'maxConcurrentBuild'
+          default: '20'
+          description: 'The maximum number of concurrent child build to run.'
+      - string:
+          name: 'kverfloor'
+          default: 'v2.6.36-rt0-rebase'
+          description: 'The lowest kernel version to build.'
+      - string:
+          name: 'kverceil'
+          default: '{kverceil}'
+          description: 'The highest kernel version to build. (excluded)'
+      - string:
+          name: 'kverfilter'
+          default: '{kverfilter}'
+          description: 'Kernel versions list filtering strategy.'
+      - string:
+          name: 'kgitrepo'
+          default: 'git://git-mirror.internal.efficios.com/kernel/rt/linux-stable-rt.git'
+          description: 'The linux kernel git repository url.'
+      - string:
+          name: 'kbuildjob'
+          default: 'lttng-modules_PARAM_build'
+          description: 'The parametrized job to use for child builds.'
+
+- lttng-modules_build_builders_defaults: &lttng-modules_build_builders_defaults
+    name: 'lttng-modules_build_builders_defaults'
+    builders:
+      - system-groovy:
+         command:
+           !include-raw-escape: scripts/lttng-modules/master.groovy
+
+- lttng-modules_build_rt_builders_defaults: &lttng-modules_build_rt_builders_defaults
+    name: 'lttng-modules_build_rt_builders_defaults'
+    builders:
+      - system-groovy:
+         command:
+           !include-raw-escape: scripts/lttng-modules/master-rt.groovy
+
+
+## Defaults
 - defaults:
     name: lttng-modules
     description: |
-      Build lttng-modules against different Linux kernels.
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
 
       <p>Job is managed by Jenkins Job Builder.</p>
 
     project-type: freestyle
 
-    logrotate:
-        daysToKeep: -1
-        numToKeep: 2
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
     wrappers:
       - workspace-cleanup
       - timestamps
 
     scm:
       - git:
-          url: git://github.com/lttng/lttng-modules.git
+          url: git://github.com/{github_user}/{github_name}.git
           browser: githubweb
-          browser-url: https://github.com/efficios/lttng-modules
+          browser-url: https://github.com/{github_user}/{github_name}
           branches:
             - "{mversion}"
           shallow-clone: true
-          skip-tag: true
           fastpoll: true
-          basedir: lttng-modules
+          basedir: src/lttng-modules
+          wipe-workspace: false
+          skip-tag: true
 
     triggers:
       - pollscm:
-          cron: "@daily"
+          cron: "@hourly"
 
     properties:
+      - build-discarder:
+          num-to-keep: 2
       - github:
-          url: https://github.com/efficios/lttng-modules
-      - throttle:
-          max-per-node: 0
-          max-total: 0
-          option: category
-          categories:
-            - 'lttng-module-linux'
+          url: https://github.com/{github_user}/{github_name}
+
+    publishers:
+      - workspace-cleanup
+      - email-ext:
+          recipients: '{obj:email_to}'
+          reply-to: ci-notification@lists.lttng.org
+          always: false
+          unstable: false
+          first-failure: true
+          first-unstable: true
+          not-built: false
+          aborted: false
+          regression: false
+          failure: false
+          second-failure: false
+          improvement: false
+          still-failing: false
+          success: false
+          fixed: false
+          fixed-unhealthy: true
+          still-unstable: false
+          pre-build: false
+          matrix-trigger: only-parent
+          send-to:
+            - recipients
 
 
 ## Templates
 - job-template:
-    name: lttng-modules_{mversion}_{kversion}_{buildtype}
+    name: lttng-modules_ALL_trigger-vanilla
     defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will trigger the build jobs when a new tag is added to the vanilla
+      and stable kernel trees.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    wrappers:
+      - timestamps
+      - ansicolor
+
+    scm: []
+
+    triggers:
+      - timed: "@hourly"
+
+    builders:
+      - system-groovy:
+         command:
+           !include-raw-escape: scripts/lttng-modules/trigger-vanilla.groovy
+
+    publishers: []
+
+- job-template:
+    name: lttng-modules_{mversion}_{buildtype}-vanilla
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will build the {mversion} branch against stable vanilla
+      kernel tags.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    <<: *lttng-modules_build_parameters_defaults
+    <<: *lttng-modules_build_builders_defaults
+
+- job-template:
+    name: lttng-modules_{mversion}_fullbuild-vanilla
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will build the {mversion} branch against all stable vanilla
+      kernel tags.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    <<: *lttng-modules_build_parameters_defaults
+    <<: *lttng-modules_build_builders_defaults
+
+    triggers:
+      - pollscm:
+          cron: "@midnight"
+
+- job-template:
+    name: lttng-modules_{mversion}_{buildtype}-{uversion}
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will build the {mversion} branch against Ubuntu {uversion}
+      released kernels, including the LTS backport kernels.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    <<: *lttng-modules_build_parameters_ubuntu
+    <<: *lttng-modules_build_builders_defaults
+
+- job-template:
+    name: lttng-modules_{mversion}_fullbuild-{uversion}
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will build the {mversion} branch against Ubuntu {uversion}
+      released kernels, including the LTS backport kernels.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    <<: *lttng-modules_build_parameters_ubuntu
+    <<: *lttng-modules_build_builders_defaults
+
+    triggers:
+      - pollscm:
+          cron: "@midnight"
+
+- job-template:
+    name: lttng-modules_{mversion}_build-rt
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job will build the {mversion} branch against all Linutronix RT
+      kernels.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    node: 'master'
+
+    <<: *lttng-modules_build_parameters_rt
+    <<: *lttng-modules_build_rt_builders_defaults
+
+- job-template:
+    name: lttng-modules_PARAM_build
+    defaults: lttng-modules
+    description: |
+      This is a parametrized job used by 'master' jobs to build any combinations
+      of lttng-modules and linux kernel versions.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
 
     project-type: matrix
-    node: 'x86-32 || x86-64' # Applies only to matrix flyweight task
+    node: 'master' # Applies only to matrix flyweight task
     axes:
       - axis:
-         type: slave
-         name: arch
-         values: '{obj:arch}'
+          type: slave
+          name: arch
+          values: '{obj:arch}'
+
+    properties:
+      - build-discarder:
+          days-to-keep: 2
+
+    parameters:
+      - string:
+          name: 'mversion'
+          default: 'master'
+          description: 'The lttng-modules branch to build.'
+      - string:
+          name: 'mgitrepo'
+          default: 'git://github.com/lttng/lttng-modules.git'
+          description: 'The lttng-modules git repository url.'
+      - string:
+          name: 'ktag'
+          default: ''
+          description: 'The linux kernel git tag to build against.'
+      - string:
+          name: 'kgitrepo'
+          default: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
+          description: 'The linux kernel git repository url.'
+
+    concurrent: true
+
+    scm: []
+
+    triggers:
 
     builders:
-      - copyartifact:
-          project: kernel_{kversion}_{buildtype}/arch=$arch
-          which-build: last-successful
-          stable: true
-          filter: 'build/**'
-          target: 'deps/linux'
-          do-not-fingerprint: true
-      - shell: |
-          git clone --depth=1 -b "v{kversion}" --reference $HOME/gitcache/linux-stable.git/ git://artifacts.internal.efficios.com/git/linux-stable.git linux
       - shell:
-              !include-raw-escape scripts/lttng-modules/build.sh
+          !include-raw-escape: scripts/lttng-modules/param-build.sh
+
+    publishers:
+      - workspace-cleanup
+
+
+- job-template:
+    name: lttng-modules_PARAM_crossbuild
+    defaults: lttng-modules
+    description: |
+      This is a parametrized job used by 'master' jobs to build any combinations
+      of lttng-modules and linux kernel versions.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    project-type: matrix
+    node: 'master' # Applies only to matrix flyweight task
+    axes:
+      - axis:
+          type: user-defined
+          name: cross_arch
+          values: '{obj:cross_arch}'
+
+    properties:
+      - build-discarder:
+          days-to-keep: 2
+
+    parameters:
+      - string:
+          name: 'mversion'
+          default: 'master'
+          description: 'The lttng-modules branch to build.'
+      - string:
+          name: 'mgitrepo'
+          default: 'git://github.com/lttng/lttng-modules.git'
+          description: 'The lttng-modules git repository url.'
+      - string:
+          name: 'ktag'
+          default: ''
+          description: 'The linux kernel git tag to build against.'
+      - string:
+          name: 'kgitrepo'
+          default: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
+          description: 'The linux kernel git repository url.'
+
+    concurrent: true
+
+    scm: []
+
+    triggers:
+
+    builders:
+      - shell:
+          !include-raw-escape: scripts/lttng-modules/param-build.sh
 
     publishers:
-      - archive:
-          artifacts: 'build/**'
-          allow-empty: false
       - workspace-cleanup
 
 - job-template:
-    name: lttng-modules_{version}_coverity
+    name: lttng-modules_{mversion}_coverity
     defaults: lttng-modules
-    node: 'x86-64'
+    node: 'amd64'
 
     triggers:
       - pollscm:
               password: COVERITY_SCAN_TOKEN
 
     builders:
+      - shell: |
+         git clone --depth=1 -b v4.20 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
+         cd src/linux
+         make defconfig
+         sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config
+         make modules_prepare
       - shell:
-          !include-raw-escape scripts/common/coverity.sh
+         !include-raw-escape: scripts/common/coverity.sh
+
+    publishers:
+      - archive:
+          artifacts: 'analysis-results.tgz,cov-int/**'
+          allow-empty: false
+      - workspace-cleanup
+
+- job-template:
+    name: lttng-modules_{mversion}_cppcheck
+    defaults: lttng-modules
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    builders:
+      - shell: |
+          rm -f cppcheck-result.xml
+          cppcheck --enable=all --xml --xml-version=2 $WORKSPACE/src/lttng-modules 2> cppcheck-result.xml
+
+    publishers:
+      - archive:
+          artifacts: 'cppcheck-result.xml'
+          allow-empty: false
+      - cppcheck:
+          pattern: 'cppcheck-result.xml'
+
+- job-template:
+    name: lttng-modules_{mversion}_sloccount
+    defaults: lttng-modules
+    description: |
+      The LTTng modules provide Linux kernel tracing capability to the LTTng
+      2.0 tracer toolset.
+
+      This job runs the sloccount utility and generates a trend report.
+
+      <p>Job is managed by Jenkins Job Builder.</p>
+
+    triggers:
+      - pollscm:
+          cron: "@daily"
+
+    builders:
+      - shell: |
+          cloc --by-file --xml --out=cloc.xml src/lttng-modules/
 
     publishers:
+      - archive:
+          artifacts: 'cloc.xml'
+          allow-empty: false
+      - sloccount:
+          report-files: 'cloc.xml'
       - workspace-cleanup
 
+
 ## Project
 - project:
     name: lttng-modules
-    mversion:
-      !include jobs/inc/lttng-modules-versions.yaml.inc
-    kversion:
-      !include jobs/inc/kernel-versions.yaml.inc
+    github_user: lttng
+    github_name: lttng-modules
+    email_to: 'ci-notification@lists.lttng.org, cc:mathieu.desnoyers@efficios.com'
     jobs:
-      - 'lttng-modules_{mversion}_{kversion}_{buildtype}':
+
+# Vanilla normal builds
+      - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+          mversion:
+            - master
           buildtype: build
-          arch: !!python/tuple [x86-32, x86-64]
-      #- 'lttng-modules_{mversion}_{kversion}_{buildtype}':
-      #    buildtype: portbuild
-      #    arch: !!python/tuple [armhf, powerpc]
-      - 'lttng-modules_{version}_coverity':
-          version: master
+          parambuildtype: build
+          kverfloor: v3.0
+          kverceil: ''
+          kverfilter: stable-head
+      - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+          buildtype: build
+          parambuildtype: build
+          kverfloor: v2.6.36
+          kverceil: ''
+          kverfilter: stable-head
+      - 'lttng-modules_{mversion}_fullbuild-vanilla':
+          mversion:
+            - master
+          buildtype: build
+          parambuildtype: build
+          kverfloor: v3.0
+          kverceil: ''
+          kverfilter: none
+      - 'lttng-modules_{mversion}_fullbuild-vanilla':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+          buildtype: build
+          parambuildtype: build
+          kverfloor: v2.6.36
+          kverceil: ''
+          kverfilter: none
+
+# RT normal builds
+      - 'lttng-modules_{mversion}_build-rt':
+          mversion: master
+          kverceil: ''
+          kverfilter: stable-head
+
+# Ubuntu normal builds
+      - 'lttng-modules_{mversion}_{buildtype}-{uversion}':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+            - master
+          uversion:
+            - xenial
+            - bionic
+            - focal
+          buildtype: build
+          parambuildtype: build
+          kverfloor: ''
+          kverceil: ''
+          kverfilter: stable-head
+
+# Vanilla crossbuilds
+      - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+            - master
+          buildtype: crossbuild
+          parambuildtype: crossbuild
+          kverfloor: v3.18
+          kverceil: ''
+          kverfilter: stable-head
+
+# Ubuntu cross builds
+      - 'lttng-modules_{mversion}_{buildtype}-{uversion}':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+            - master
+          uversion:
+            - xenial
+            - bionic
+          buildtype: crossbuild
+          parambuildtype: crossbuild
+          kverfloor: ''
+          kverceil: ''
+          kverfilter: stable-head
+
+# Parametrized kernel and modules build jobs
+      - 'lttng-modules_PARAM_build':
+          arch: !!python/tuple [amd64]
+      - 'lttng-modules_PARAM_crossbuild':
+          cross_arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
+
+# Misc jobs
+      - 'lttng-modules_ALL_trigger-vanilla'
+      - 'lttng-modules_{mversion}_cppcheck':
+          mversion:
+            - stable-2.10
+            - stable-2.11
+            - master
+      - 'lttng-modules_{mversion}_sloccount':
+          mversion: master
+      - 'lttng-modules_{mversion}_coverity':
+          mversion: master
This page took 0.028107 seconds and 4 git commands to generate.