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}'
name: lttng-modules
github_user: lttng
github_name: lttng-modules
- mversion:
- - stable-2.7
- - stable-2.8
- - stable-2.9
- - master
jobs:
- 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion:
+ - stable-2.9
+ - master
+ buildtype: build
+ kverfloor: v2.6.36
+ kverceil: ''
+ kverfilter: none
+ - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion: stable-2.7
+ buildtype: build
+ kverfloor: v2.6.36
+ kverceil: v4.8-rc0
+ kverfilter: none
+ - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion: stable-2.8
buildtype: build
kverfloor: v2.6.36
+ kverceil: v4.10-rc0
kverfilter: none
- 'lttng-modules_{mversion}_build-rt':
mversion: master
- 'lttng-modules_{mversion}_build-{uversion}':
+ mversion:
+ - stable-2.8
+ - stable-2.9
+ - master
uversion:
- trusty
- xenial
- 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion:
+ - stable-2.9
+ - master
+ buildtype: crossbuild
+ kverfloor: v3.16
+ kverceil: ''
+ kverfilter: stable-head
+ - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion: stable-2.7
+ buildtype: crossbuild
+ kverfloor: v3.16
+ kverceil: v4.8-rc0
+ kverfilter: stable-head
+ - 'lttng-modules_{mversion}_{buildtype}-vanilla':
+ mversion: stable-2.8
buildtype: crossbuild
kverfloor: v3.16
+ kverceil: v4.10-rc0
kverfilter: stable-head
- 'lttng-modules_VERSION_param-build':
arch: !!python/tuple [x86-32, x86-64]
- 'lttng-modules_VERSION_param-crossbuild':
cross_arch: !!python/tuple [armhf, arm64, powerpc, ppc64el]
- - 'lttng-modules_{mversion}_cppcheck'
+ - 'lttng-modules_{mversion}_cppcheck':
+ mversion:
+ - stable-2.8
+ - stable-2.9
+ - master
- 'lttng-modules_{mversion}_sloccount':
mversion: master
- 'lttng-modules_{mversion}_coverity':
import org.eclipse.jgit.lib.Ref
+class InvalidkVersionException extends Exception {
+ public InvalidkVersionException(String message) {
+ super(message)
+ }
+}
+
+class EmptykVersionException extends Exception {
+ public EmptykVersionException(String message) {
+ super(message)
+ }
+}
+
class kVersion implements Comparable<kVersion> {
Integer major = 0;
this.patch = 0
this.rc = Integer.MAX_VALUE
+ if (!version) {
+ throw new EmptykVersionException("Empty kernel version")
+ }
+
def match = version =~ /^v(\d+)\.(\d+)(\.(\d+))?(\.(\d+))?(-rc(\d+))?$/
if (!match) {
- throw new Exception("Invalid kernel version: ${version}")
+ throw new InvalidkVersionException("Invalid kernel version: ${version}")
}
Integer offset = 0;
def mversion = build.buildVariableResolver.resolve('mversion')
def maxConcurrentBuild = build.buildVariableResolver.resolve('maxConcurrentBuild')
def kgitrepo = build.buildVariableResolver.resolve('kgitrepo')
-def kverfloor = new kVersion(build.buildVariableResolver.resolve('kverfloor'))
+def kverfloor_raw = build.buildVariableResolver.resolve('kverfloor')
+def kverceil_raw = build.buildVariableResolver.resolve('kverceil')
def kverfilter = build.buildVariableResolver.resolve('kverfilter')
def job = Hudson.instance.getJob(build.buildVariableResolver.resolve('kbuildjob'))
def currentJobName = build.project.getFullDisplayName()
+// Parse kernel versions
+def kverfloor = new kVersion(kverfloor_raw)
+def kverceil = ""
+
+try {
+ kverceil = new kVersion(kverceil_raw)
+} catch (EmptykVersionException e) {
+ kverceil = new kVersion("v" + Integer.MAX_VALUE + ".0.0")
+}
+
// Get the out variable
def config = new HashMap()
def bindings = getBinding()
config.putAll(bindings.getVariables())
def out = config['out']
-def jlc = new jenkins.model.JenkinsLocationConfiguration()
-def jenkinsUrl = jlc.url
// Get tags from git repository
def refs = Git.lsRemoteRepository().setTags(true).setRemote(kgitrepo).call();
if (match) {
def v = new kVersion(match.group(1))
- if (v >= kverfloor) {
+ if ((v >= kverfloor) && (v < kverceil)) {
if (v.isRC()) {
kversionsRC.add(v)
} else {