X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-modules%2Fmaster.groovy;h=6efffe5021ce3c575013129da608cc92343ec00e;hb=2bd4c4ca63118876e21337a6b3d550bf39535d5a;hp=d74d136802ac8b2e7f2bb58069de728e43846ce4;hpb=073dc82cb9f7d11e9ec54ae50225693b2bf265f2;p=lttng-ci.git diff --git a/scripts/lttng-modules/master.groovy b/scripts/lttng-modules/master.groovy index d74d136..6efffe5 100644 --- a/scripts/lttng-modules/master.groovy +++ b/scripts/lttng-modules/master.groovy @@ -296,7 +296,8 @@ class UbuntuKVersion implements Comparable { vString = vString.concat("${this.strLTS}") } - if (this.major >= 5 && this.minor >= 8) { + // The tag pattern changed for HWE kernels >= 5.0 + if (this.isLTS && this.major >= 5) { vString = vString.concat("${this.major}.${this.minor}-${this.major}.${this.minor}.${this.patch}-${this.umajor}.${this.uminor}${this.suffix}") } else { vString = vString.concat("${this.major}.${this.minor}.${this.patch}-${this.umajor}.${this.uminor}${this.suffix}") @@ -344,18 +345,23 @@ def kversionFactory = "" if (uversion != null) { kversionFactory = new UbuntuKVersion() switch (uversion) { + case 'jammy': + matchStrs = [ + ~/^refs\/tags\/(Ubuntu-5\.15\.0-\d{1,3}?\.[\d]+)$/, + ] + break + case 'focal': matchStrs = [ ~/^refs\/tags\/(Ubuntu-5\.4\.0-\d{1,3}?\.[\d]+)$/, - ~/^refs\/tags\/(Ubuntu-hwe-5\.8-.*_20\.04\.\d+)$/, + ~/^refs\/tags\/(Ubuntu-hwe-5\.13-5\.13\.0-.*_20\.04\.\d+)$/, ] break case 'bionic': matchStrs = [ ~/^refs\/tags\/(Ubuntu-4\.15\.0-\d{1,3}?\.[\d]+)$/, - ~/^refs\/tags\/(Ubuntu-hwe-5\.0\.0-.*_18\.04\.\d+)$/, - ~/^refs\/tags\/(Ubuntu-hwe-5\.3\.0-.*_18\.04\.\d+)$/, + ~/^refs\/tags\/(Ubuntu-hwe-5\.4-5\.4\.0-.*_18\.04\.\d+)$/, ] break @@ -364,17 +370,6 @@ if (uversion != null) { ~/^refs\/tags\/(Ubuntu-4\.4\.0-\d{1,3}?\.[\d]+)$/, ~/^refs\/tags\/(Ubuntu-hwe-4\.15\.0-.*_16\.04\.\d+)$/, ] - - blacklist = [ - 'Ubuntu-lts-4.10.0-7.9_16.04.1', - ] - break - - case 'trusty': - matchStrs = [ - ~/^refs\/tags\/(Ubuntu-3\.13\.0-[\d\.]+)$/, - ~/^refs\/tags\/(Ubuntu-lts-.*_14\.04\.\d+)$/, - ] break default: @@ -426,6 +421,7 @@ for (ref in refs) { } } +// The filtering step assumes the version lists are sorted kversions.sort() kversionsRC.sort() @@ -447,6 +443,45 @@ switch (kverfilter) { } break + case 'lts': + // 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") + + // First filter the head of each branch + for (i = 0; i < kversions.size(); i++) { + def curr = kversions[i] + def next = i < kversions.size() - 1 ? kversions[i + 1] : null + + if (next != null) { + if (curr.isSameStable(next)) { + kversions.remove(i) + i-- + } + } + } + + for (i = 0; i < kversions.size(); i++) { + def curr = kversions[i] + + // Keep the newest tag + if (i == kversions.size() - 1) { + break + } + + // 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))) { + kversions.remove(i) + i-- + } + } + break + default: // No filtering of kernel versions println('No kernel versions filtering selected.')