- lttng-modules_build_parameters_defaults: <tng-modules_build_parameters_defaults
name: 'lttng-modules_build_parameters_defaults'
parameters:
- - string:
- name: 'mversion'
- default: '{mversion}'
- description: 'The lttng-modules branch to build.'
- string:
name: 'maxConcurrentBuild'
default: '20'
name: 'kverfilter'
default: '{kverfilter}'
description: 'Kernel versions list filtering strategy.'
+ - string:
+ name: 'kverrc'
+ default: 'true'
+ description: 'Add latest RC to kernel versions list.'
- string:
name: 'kgitrepo'
default: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
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'
+ parameters:
+ - string:
+ name: 'maxConcurrentBuild'
+ default: '10'
+ description: 'The maximum number of concurrent child build to run.'
+ - string:
+ 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}'
+ description: 'Kernel versions list filtering strategy.'
+ - string:
+ name: 'kverrc'
+ default: 'false'
+ description: 'Add latest RC to kernel versions list.'
+ - string:
+ name: 'kgitrepo'
+ default: 'git://git-mirror.internal.efficios.com/git/linux-all.git'
+ description: 'The linux kernel git repository url.'
+ - string:
+ name: 'kbuildjob'
+ default: 'lttng-modules_PARAM_build'
+ description: 'The parametrized job to use for child builds.'
+
- lttng-modules_build_parameters_ubuntu: <tng-modules_build_parameters_ubuntu
name: 'lttng-modules_build_parameters_ubuntu'
parameters:
- - string:
- name: 'mversion'
- default: '{mversion}'
- description: 'The lttng-modules branch to build.'
- string:
name: 'maxConcurrentBuild'
default: '20'
name: 'kverfilter'
default: '{kverfilter}'
description: 'Kernel versions list filtering strategy.'
+ - string:
+ name: 'kverrc'
+ default: 'false'
+ description: 'Add latest RC to kernel versions list.'
- string:
name: 'kgitrepo'
default: 'git://git-mirror.internal.efficios.com/git/ubuntu-{uversion}.git'
- lttng-modules_build_parameters_rt: <tng-modules_build_parameters_rt
name: 'lttng-modules_build_parameters_rt'
parameters:
- - string:
- name: 'mversion'
- default: '{mversion}'
- description: 'The lttng-modules branch to build.'
- string:
name: 'maxConcurrentBuild'
default: '20'
name: 'kverfilter'
default: '{kverfilter}'
description: 'Kernel versions list filtering strategy.'
+ - string:
+ name: 'kverrc'
+ default: 'false'
+ description: 'Add latest RC to kernel versions list.'
- string:
name: 'kgitrepo'
default: 'git://git-mirror.internal.efficios.com/kernel/rt/linux-stable-rt.git'
browser: githubweb
browser-url: https://github.com/{github_user}/{github_name}
branches:
- - "{mversion}"
+ - "refs/heads/{mversion}"
shallow-clone: true
fastpoll: true
basedir: src/lttng-modules
<<: *lttng-modules_build_parameters_defaults
<<: *lttng-modules_build_builders_defaults
+- job-template:
+ name: dev_gerrit_lttng-modules_build
+ defaults: lttng-modules
+ concurrent: true
+
+ node: 'master'
+
+ scm:
+ - git:
+ url: https://review.lttng.org/lttng-modules
+ refspec: 'refs/changes/*:refs/changes/*'
+ branches:
+ - '$GERRIT_REFSPEC'
+ basedir: src/lttng-modules
+ skip-tag: true
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - comment-added-event:
+ approval-category: 'CI-Build'
+ approval-value: 1
+ projects:
+ - project-compare-type: 'PLAIN'
+ project-pattern: 'lttng-modules'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**'
+ trigger-for-unreviewed-patches: true
+
+ properties:
+ - build-discarder:
+ num-to-keep: 2
+
+ <<: *lttng-modules_build_parameters_gerrit
+ <<: *lttng-modules_build_builders_defaults
+
+ publishers:
+ - workspace-cleanup
+
- job-template:
name: lttng-modules_{mversion}_fullbuild-vanilla
defaults: lttng-modules
builders:
- shell: |
- git clone --depth=1 -b v4.20 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
+ git clone --depth=1 -b v5.5 --reference $HOME/gitcache/linux-stable.git/ git://git-mirror.internal.efficios.com/kernel/stable/linux-stable.git src/linux
cd src/linux
- make defconfig
+ make allyesconfig
sed -i "s/# CONFIG_KALLSYMS_ALL is not set/CONFIG_KALLSYMS_ALL=y/g" .config
make modules_prepare
- shell:
mversion: master
- 'lttng-modules_{mversion}_coverity':
mversion: master
+
+- project:
+ name: lttng-modules-gerrit
+ jobs:
+ - 'dev_gerrit_lttng-modules_build':
+ kverfloor: v5.5
+ kverceil: v5.6
+ kverfilter: stable-head
// Retrieve parameters of the current build
-def mversion = build.buildVariableResolver.resolve('mversion')
+def mbranch = build.getEnvironment(listener).get('GIT_BRANCH').minus('origin/')
def maxConcurrentBuild = build.buildVariableResolver.resolve('maxConcurrentBuild')
def kgitrepo = build.buildVariableResolver.resolve('kgitrepo')
def kverfloor_raw = build.buildVariableResolver.resolve('kverfloor')
if(ongoingBuild.size() < maxConcurrentBuild.toInteger() && kversions.size() != 0) {
def kversion = kversions.pop()
def job_params = [
- new StringParameterValue('mversion', mversion),
+ new StringParameterValue('mversion', mbranch),
new StringParameterValue('mgitrepo', mgitrepo),
new StringParameterValue('ktag', kversion.toString()),
new StringParameterValue('kgitrepo', kgitrepo),
// Launch the parametrized build
def param_build = job.scheduleBuild2(0, new Cause.UpstreamCause(build), new ParametersAction(job_params))
- println "triggering ${joburl} for the ${mversion} branch on kernel ${kversion}"
+ println "triggering ${joburl} for the ${mbranch} branch on kernel ${kversion}"
// Add it to the ongoing build queue
ongoingBuild.push(param_build)
// Retrieve parameters of the current build
-def mversion = build.buildVariableResolver.resolve('mversion')
+def mbranch = build.getEnvironment(listener).get('GIT_BRANCH').minus('origin/')
def maxConcurrentBuild = build.buildVariableResolver.resolve('maxConcurrentBuild')
def kgitrepo = build.buildVariableResolver.resolve('kgitrepo')
def kverfloor_raw = build.buildVariableResolver.resolve('kverfloor')
def kverceil_raw = build.buildVariableResolver.resolve('kverceil')
def kverfilter = build.buildVariableResolver.resolve('kverfilter')
+def kverrc = build.buildVariableResolver.resolve('kverrc')
def uversion = build.buildVariableResolver.resolve('uversion')
def job = Hudson.instance.getJob(build.buildVariableResolver.resolve('kbuildjob'))
def currentJobName = build.project.getFullDisplayName()
break
}
-// If the last RC version is newer than the last stable, add it to the build list
-if (kversionsRC.size() > 0 && kversionsRC.last() > kversions.last()) {
- kversions.add(kversionsRC.last())
+if (kverrc == "true") {
+ // If the last RC version is newer than the last stable, add it to the build list
+ if (kversionsRC.size() > 0 && kversionsRC.last() > kversions.last()) {
+ kversions.add(kversionsRC.last())
+ }
}
println "Building the following kernel versions:"
if(ongoingBuild.size() < maxConcurrentBuild.toInteger() && kversions.size() != 0) {
def kversion = kversions.pop()
def job_params = [
- new StringParameterValue('mversion', mversion),
+ new StringParameterValue('mversion', mbranch),
new StringParameterValue('mgitrepo', mgitrepo),
new StringParameterValue('ktag', kversion.toString()),
new StringParameterValue('kgitrepo', kgitrepo),
// Launch the parametrized build
def param_build = job.scheduleBuild2(0, new Cause.UpstreamCause(build), new ParametersAction(job_params))
- println "triggering ${joburl} for the ${mversion} branch on kernel ${kversion}"
+ println "triggering ${joburl} for the ${mbranch} branch on kernel ${kversion}"
// Add it to the ongoing build queue
ongoingBuild.push(param_build)
}
verlt() {
+ # shellcheck disable=SC2015
[ "$1" = "$2" ] && return 1 || verlte "$1" "$2"
}
}
vergt() {
+ # shellcheck disable=SC2015
[ "$1" = "$2" ] && return 1 || vergte "$1" "$2"
}
git_clone_modules_sources() {
mkdir -p "$MODULES_GIT_DIR"
- git clone --depth=1 -b "${mversion}" "${mgitrepo}" "$MODULES_GIT_DIR"
+
+ # If the version starts with "refs/", checkout the specific git ref, otherwise treat it
+ # as a branch name.
+ if [ "${mversion:0:5}" = "refs/" ]; then
+ git clone --no-tags --depth=1 "${mgitrepo}" "$MODULES_GIT_DIR"
+ (cd "$MODULES_GIT_DIR" && git fetch origin "${mversion}" && git checkout FETCH_HEAD)
+ else
+ git clone --no-tags --depth=1 -b "${mversion}" "${mgitrepo}" "$MODULES_GIT_DIR"
+ fi
}
# Checkout a shallow kernel tree of the specified tag