From: Michael Jeanson Date: Mon, 24 Apr 2023 19:40:13 +0000 (-0400) Subject: jjb: lttng-modules: split gerrit jobs by branch X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3da11679b413e19bf7bd6081c8f228a076e196c7;p=lttng-ci.git jjb: lttng-modules: split gerrit jobs by branch 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 --- diff --git a/jobs/lttng-modules.yaml b/jobs/lttng-modules.yaml index 1a80e88..7385aae 100644 --- a/jobs/lttng-modules.yaml +++ b/jobs/lttng-modules.yaml @@ -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. + +

Job is managed by Jenkins Job Builder.

+ + 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: <tng-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: <tng-modules_build_parameters_defaults +- _lttng-modules_build_parameters_defaults: <tng-modules_build_parameters_defaults name: 'lttng-modules_build_parameters_defaults' parameters: - string: @@ -32,8 +102,8 @@ default: 'lttng-modules_PARAM_{parambuildtype}' description: 'The parametrized job to use for child builds.' -- lttng-modules_build_parameters_gerrit: <tng-modules_build_parameters_gerrit - name: 'lttng-modules_build_parameters_defaults' +- _lttng-modules_build_parameters_review: <tng-modules_build_parameters_review + name: 'lttng-modules_build_parameters_review' parameters: - string: name: 'maxConcurrentBuild' @@ -64,7 +134,7 @@ default: 'lttng-modules_PARAM_build' description: 'The parametrized job to use for child builds.' -- lttng-modules_build_parameters_ubuntu: <tng-modules_build_parameters_ubuntu +- _lttng-modules_build_parameters_ubuntu: <tng-modules_build_parameters_ubuntu name: 'lttng-modules_build_parameters_ubuntu' parameters: - string: @@ -100,7 +170,7 @@ default: '{uversion}' description: 'The lowest kernel version to build.' -- lttng-modules_build_parameters_rt: <tng-modules_build_parameters_rt +- _lttng-modules_build_parameters_rt: <tng-modules_build_parameters_rt name: 'lttng-modules_build_parameters_rt' parameters: - string: @@ -132,14 +202,14 @@ default: 'lttng-modules_PARAM_build' description: 'The parametrized job to use for child builds.' -- lttng-modules_build_builders_defaults: <tng-modules_build_builders_defaults +- _lttng-modules_build_builders_defaults: <tng-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: <tng-modules_build_rt_builders_defaults +- _lttng-modules_build_rt_builders_defaults: <tng-modules_build_rt_builders_defaults name: 'lttng-modules_build_rt_builders_defaults' builders: - system-groovy: @@ -147,76 +217,6 @@ !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. - -

Job is managed by Jenkins Job Builder.

- - 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: <tng-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 @@ -312,7 +312,7 @@ <<: *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 @@ -337,8 +337,8 @@ - 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: @@ -348,7 +348,7 @@ categories: - 'gerrit-build' - <<: *lttng-modules_build_parameters_gerrit + <<: *lttng-modules_build_parameters_review <<: *lttng-modules_build_builders_defaults publishers: @@ -473,7 +473,7 @@ scm: [] - triggers: + triggers: [] builders: - shell: @@ -525,7 +525,7 @@ scm: [] - triggers: + triggers: [] builders: - shell: @@ -578,7 +578,7 @@ scm: [] - triggers: + triggers: [] builders: - shell: @@ -760,12 +760,23 @@ 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 diff --git a/scripts/lttng-modules/master.groovy b/scripts/lttng-modules/master.groovy index 6efffe5..9c9d123 100644 --- a/scripts/lttng-modules/master.groovy +++ b/scripts/lttng-modules/master.groovy @@ -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-- }