/**
- * Copyright (C) 2016-2017 - Michael Jeanson <mjeanson@efficios.com>
+ * Copyright (C) 2016-2018 - Michael Jeanson <mjeanson@efficios.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Integer umajor = 0
Integer uminor = 0
String suffix = ""
+ String strLTS = ""
Boolean isLTS = false
UbuntuKVersion() {}
//'Ubuntu-lts-4.8.0-27.29_16.04.1',
//'Ubuntu-4.4.0-70.91',
- def match = version =~ /^Ubuntu-(lts-)??(\d+)\.(\d+)\.(\d+)-(\d+)\.(\d+)(.*)??$/
+ def match = version =~ /^Ubuntu-(lts-|hwe-)??(\d+)\.(\d+)\.(\d+)-(\d+)\.(\d+)(.*)??$/
if (!match) {
throw new InvalidKVersionException("Invalid kernel version: ${version}")
}
- this.isLTS = match.group(1) != null
+ if (match.group(1) != null) {
+ this.isLTS = true
+ this.strLTS = match.group(1)
+ }
// Major
this.major = Integer.parseInt(match.group(2))
String vString = "Ubuntu-"
if (this.isLTS) {
- vString = vString.concat("lts-")
+ vString = vString.concat("${this.strLTS}")
}
vString = vString.concat("${this.major}.${this.minor}.${this.patch}-${this.umajor}.${this.uminor}${this.suffix}")
def uversion = build.buildVariableResolver.resolve('uversion')
def job = Hudson.instance.getJob(build.buildVariableResolver.resolve('kbuildjob'))
def currentJobName = build.project.getFullDisplayName()
-
+def gitmodpath = build.getEnvironment(listener).get('WORKSPACE') + "/src/lttng-modules"
// Get the out variable
def config = new HashMap()
def out = config['out']
+// Get the lttng-modules git url
+def gitmodrepo = Git.open(new File(gitmodpath))
+def mgitrepo = gitmodrepo.getRepository().getConfig().getString("remote", "origin", "url")
+
// Get tags from git repository
-def refs = Git.lsRemoteRepository().setTags(true).setRemote(kgitrepo).call();
+def refs = Git.lsRemoteRepository().setTags(true).setRemote(kgitrepo).call()
// Get kernel versions to build
def kversions = []
case 'bionic':
matchStrs = [
~/^refs\/tags\/(Ubuntu-4\.15\.0-\d{1,3}?\.[\d]+)$/,
+// ~/^refs\/tags\/(Ubuntu-hwe-4\.18\.0-.*_18\.04\.\d+)$/,
]
break
case 'xenial':
matchStrs = [
~/^refs\/tags\/(Ubuntu-4\.4\.0-\d{1,3}?\.[\d]+)$/,
- ~/^refs\/tags\/(Ubuntu-lts-4\.8\.0-.*_16\.04\.\d+)$/,
- ~/^refs\/tags\/(Ubuntu-lts-4\.10\.0-.*_16\.04\.\d+)$/,
- ~/^refs\/tags\/(Ubuntu-lts-4\.15\.0-.*_16\.04\.\d+)$/,
+ ~/^refs\/tags\/(Ubuntu-hwe-4\.8\.0-.*_16\.04\.\d+)$/,
+ ~/^refs\/tags\/(Ubuntu-hwe-4\.10\.0-.*_16\.04\.\d+)$/,
+ ~/^refs\/tags\/(Ubuntu-hwe-4\.13\.0-.*_16\.04\.\d+)$/,
+ ~/^refs\/tags\/(Ubuntu-hwe-4\.15\.0-.*_16\.04\.\d+)$/,
]
blacklist = [
matchStrs = [
~/^refs\/tags\/(v[\d\.]+(-rc(\d+))?)$/,
]
+ blacklist = [
+ 'v3.2.3',
+ ]
}
// Parse kernel versions
def kversion = kversions.pop()
def job_params = [
new StringParameterValue('mversion', mversion),
+ new StringParameterValue('mgitrepo', mgitrepo),
new StringParameterValue('ktag', kversion.toString()),
new StringParameterValue('kgitrepo', kgitrepo),
]