jjb: lttng-modules: split gerrit jobs by branch
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 24 Apr 2023 19:40:13 +0000 (15:40 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 25 Apr 2023 15:31:42 +0000 (11:31 -0400)
This allows to set kernel version ranges per branch. Also now build on
each current head of the kernel tls branches and the head of the latest
supported kernel branch.

Change-Id: I11f7b225df3e8188fdf72ecc82bfccd90853f343
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
jobs/lttng-modules.yaml
scripts/lttng-modules/master.groovy

index 1a80e88fcfbcb4881b2c61c83c5da4e837633176..7385aae3fecb7b650ae267489e214546b6ae91e3 100644 (file)
@@ -1,6 +1,76 @@
 ---
+## Defaults
+- defaults:
+    name: lttng-modules
+    description: |
+      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
+
+    wrappers:
+      - workspace-cleanup
+      - timestamps
+      - ansicolor
+
+    scm:
+      - git:
+          url: https://github.com/{github_user}/{github_name}.git
+          browser: githubweb
+          browser-url: https://github.com/{github_user}/{github_name}
+          branches:
+            - "refs/heads/{mversion}"
+          shallow-clone: true
+          fastpoll: true
+          basedir: src/lttng-modules
+          wipe-workspace: false
+          skip-tag: true
+
+    triggers:
+      - pollscm:
+          cron: "@hourly"
+
+    properties:
+      - build-discarder:
+          num-to-keep: 10
+          artifact-num-to-keep: 2
+      - github:
+          url: https://github.com/{github_user}/{github_name}
+
+    publishers:
+      - workspace-cleanup
+      - ircbot: &lttng-modules_publisher_ircbot_defaults
+          strategy: statechange-only
+          message-type: summary-scm
+          matrix-notifier: only-configurations
+      - 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
+
+
 ## Anchors
-- lttng-modules_build_parameters_defaults: &lttng-modules_build_parameters_defaults
+- _lttng-modules_build_parameters_defaults: &lttng-modules_build_parameters_defaults
     name: 'lttng-modules_build_parameters_defaults'
     parameters:
       - string:
           default: 'lttng-modules_PARAM_{parambuildtype}'
           description: 'The parametrized job to use for child builds.'
 
-- lttng-modules_build_parameters_gerrit: &lttng-modules_build_parameters_gerrit
-    name: 'lttng-modules_build_parameters_defaults'
+- _lttng-modules_build_parameters_review: &lttng-modules_build_parameters_review
+    name: 'lttng-modules_build_parameters_review'
     parameters:
       - string:
           name: 'maxConcurrentBuild'
           default: 'lttng-modules_PARAM_build'
           description: 'The parametrized job to use for child builds.'
 
-- lttng-modules_build_parameters_ubuntu: &lttng-modules_build_parameters_ubuntu
+- _lttng-modules_build_parameters_ubuntu: &lttng-modules_build_parameters_ubuntu
     name: 'lttng-modules_build_parameters_ubuntu'
     parameters:
       - string:
           default: '{uversion}'
           description: 'The lowest kernel version to build.'
 
-- lttng-modules_build_parameters_rt: &lttng-modules_build_parameters_rt
+- _lttng-modules_build_parameters_rt: &lttng-modules_build_parameters_rt
     name: 'lttng-modules_build_parameters_rt'
     parameters:
       - string:
           default: 'lttng-modules_PARAM_build'
           description: 'The parametrized job to use for child builds.'
 
-- lttng-modules_build_builders_defaults: &lttng-modules_build_builders_defaults
+- _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
+- _lttng-modules_build_rt_builders_defaults: &lttng-modules_build_rt_builders_defaults
     name: 'lttng-modules_build_rt_builders_defaults'
     builders:
       - system-groovy:
            !include-raw-escape: scripts/lttng-modules/master-rt.groovy
 
 
-## Defaults
-- defaults:
-    name: lttng-modules
-    description: |
-      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
-
-    wrappers:
-      - workspace-cleanup
-      - timestamps
-      - ansicolor
-
-    scm:
-      - git:
-          url: https://github.com/{github_user}/{github_name}.git
-          browser: githubweb
-          browser-url: https://github.com/{github_user}/{github_name}
-          branches:
-            - "refs/heads/{mversion}"
-          shallow-clone: true
-          fastpoll: true
-          basedir: src/lttng-modules
-          wipe-workspace: false
-          skip-tag: true
-
-    triggers:
-      - pollscm:
-          cron: "@hourly"
-
-    properties:
-      - build-discarder:
-          num-to-keep: 10
-          artifact-num-to-keep: 2
-      - github:
-          url: https://github.com/{github_user}/{github_name}
-
-    publishers:
-      - workspace-cleanup
-      - ircbot: &lttng-modules_publisher_ircbot_defaults
-          strategy: statechange-only
-          message-type: summary-scm
-          matrix-notifier: only-configurations
-      - 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_ALL_trigger-vanilla
     <<: *lttng-modules_build_builders_defaults
 
 - job-template:
-    name: dev_gerrit_lttng-modules_build
+    name: dev_review_lttng-modules_{mversion}_build
     defaults: lttng-modules
     concurrent: true
 
             - project-compare-type: 'PLAIN'
               project-pattern: 'lttng-modules'
               branches:
-                - branch-compare-type: 'ANT'
-                  branch-pattern: '**'
+                - branch-compare-type: 'PLAIN'
+                  branch-pattern: '{mversion}'
 
     properties:
       - build-discarder:
           categories:
             - 'gerrit-build'
 
-    <<: *lttng-modules_build_parameters_gerrit
+    <<: *lttng-modules_build_parameters_review
     <<: *lttng-modules_build_builders_defaults
 
     publishers:
 
     scm: []
 
-    triggers:
+    triggers: []
 
     builders:
       - shell:
 
     scm: []
 
-    triggers:
+    triggers: []
 
     builders:
       - shell:
 
     scm: []
 
-    triggers:
+    triggers: []
 
     builders:
       - shell:
           mversion: master
 
 - project:
-    name: lttng-modules-gerrit
+    name: lttng-modules-review
     jobs:
-      - 'dev_gerrit_lttng-modules_build':
-          kverfloor: v5.5
-          kverceil: v5.6
-          kverfilter: stable-head
+      - 'dev_review_lttng-modules_{mversion}_build':
+          mversion: master
+          kverfloor: v4.4
+          kverceil: ''
+          kverfilter: lts-head
+      - 'dev_review_lttng-modules_{mversion}_build':
+          mversion: stable-2.13
+          kverfloor: v3.0
+          kverceil: ''
+          kverfilter: lts-head
+      - 'dev_review_lttng-modules_{mversion}_build':
+          mversion: stable-2.12
+          kverfloor: v3.0
+          kverceil: v5.18
+          kverfilter: lts-head
 
 - project:
     name: lttng-modules-dev-mjeanson
index 6efffe5021ce3c575013129da608cc92343ec00e..9c9d123faea16dcc0a4b30d1149acf6e5bf3aacb 100644 (file)
@@ -443,15 +443,19 @@ switch (kverfilter) {
     }
     break
 
-  case 'lts':
+  case 'lts-head':
     // Keep only the head of each LTS branch and the latest non-RC tag
     println('Filter kernel versions to keep only the latest point release of each lts branch and the current stable.')
 
-    def lts_44 = kversionFactory.factory("v4.4")
-    def lts_49 = kversionFactory.factory("v4.9")
-    def lts_414 = kversionFactory.factory("v4.14")
-    def lts_419 = kversionFactory.factory("v4.19")
-    def lts_54 = kversionFactory.factory("v5.4")
+    def lts_kversions = []
+    lts_kversions.add(kversionFactory.factory("v4.4"))  // SLTS until 2026
+    lts_kversions.add(kversionFactory.factory("v4.9"))  // LTS until January 2023
+    lts_kversions.add(kversionFactory.factory("v4.14")) // LTS until January 2024
+    lts_kversions.add(kversionFactory.factory("v4.19")) // LTS until December 2024
+    lts_kversions.add(kversionFactory.factory("v5.4"))  // LTS until December 2025
+    lts_kversions.add(kversionFactory.factory("v5.10")) // LTS until December 2026
+    lts_kversions.add(kversionFactory.factory("v5.15")) // LTS until October 2026
+    lts_kversions.add(kversionFactory.factory("v6.1"))  // LTS until December 2026
 
     // First filter the head of each branch
     for (i = 0; i < kversions.size(); i++) {
@@ -475,7 +479,15 @@ switch (kverfilter) {
       }
 
       // Prune non-LTS versions
-      if (!(curr.isSameStable(lts_44) || curr.isSameStable(lts_49) || curr.isSameStable(lts_414) || curr.isSameStable(lts_419) || curr.isSameStable(lts_54))) {
+      def keep = false
+      for (j = 0; j < lts_kversions.size(); j++) {
+        if (curr.isSameStable(lts_kversions[j])) {
+          keep = true
+          break
+        }
+      }
+
+      if (!keep) {
         kversions.remove(i)
         i--
       }
This page took 0.029887 seconds and 4 git commands to generate.