aboutsummaryrefslogtreecommitdiff
path: root/jenkins/bisect.jpl
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2019-04-24 16:15:10 +0100
committerGuillaume Tucker <guillaume.tucker@collabora.com>2019-05-03 12:59:46 +0100
commitc29431b53f8916d5d3c41fab5bf147f47b4e6199 (patch)
tree329f0fcdf231a184db2bc186289a259a6b99ca41 /jenkins/bisect.jpl
parentfe9d0438eb616a099c4b03a0e9bddb59ea263369 (diff)
bisect.jpl: update to use kci_build
Update bisect.jpl to use kci_build to build kernels instead of the legacy build.py. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r--jenkins/bisect.jpl66
1 files changed, 47 insertions, 19 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl
index 715136d..e379bc3 100644
--- a/jenkins/bisect.jpl
+++ b/jenkins/bisect.jpl
@@ -49,10 +49,6 @@ DEFCONFIG (defconfig)
Name of the Linux kernel defconfig
TARGET
Name of the device type to test (typically LAVA device type name)
-CC (gcc)
- Name of the compiler
-CC_VERSION (7)
- Version of the compiler
BUILD_ENVIRONMENT
Name of the build environment
LAB
@@ -216,22 +212,48 @@ git symbolic-ref HEAD refs/heads/${params.KERNEL_BRANCH}
*/
def buildKernel(kdir, kci_core) {
- dir(kdir) {
+ def output = "${kdir}/build-${params.ARCH}-${params.BUILD_ENVIRONMENT}"
+ dir(kci_core) {
sh(script: "rm -f ${env._BUILD_JSON}")
+
+ sh(script:"""\
+./kci_build \
+build_kernel \
+--kdir=${kdir} \
+--defconfig=${params.DEFCONFIG} \
+--arch=${params.ARCH} \
+--build-env=${params.BUILD_ENVIRONMENT} \
+--output=${output} \
+""")
+
+ sh(script: """\
+./kci_build \
+install_kernel \
+--kdir=${kdir} \
+--tree-name=${params.KERNEL_TREE} \
+--tree-url=${params.KERNEL_URL} \
+--branch=${params.KERNEL_BRANCH} \
+--output=${output} \
+""")
+
withCredentials([string(credentialsId: params.KCI_TOKEN_ID,
variable: 'SECRET')]) {
- sh(script: """
-API=${params.KCI_API_URL} \
-TOKEN=${SECRET} \
-TREE_NAME=${params.KERNEL_TREE} \
-TREE=${params.KERNEL_URL} \
-ARCH=${params.ARCH} \
-BRANCH=${params.KERNEL_BRANCH} \
-""" + kci_core + """/build.py -e -g -i \
--J ${env._BUILD_JSON} \
--E ${params.BUILD_ENVIRONMENT} \
--c ${params.DEFCONFIG}""")
+ sh(script: """\
+./kci_build \
+push_kernel \
+--kdir=${kdir} \
+--token=${SECRET} \
+--api=${params.KCI_API_URL} \
+""")
}
+
+ sh(script: """\
+./kci_build \
+publish_kernel \
+--kdir=${kdir} \
+--json-path=${env._BUILD_JSON} \
+""")
+
stash(name: env._BUILD_JSON, includes: env._BUILD_JSON)
}
}
@@ -597,11 +619,10 @@ node("docker && bisection") {
env._BUILD_JSON = "build-data.json"
def j = new Job()
- def docker_image = j.dockerImageName(
- params.DOCKER_BASE, params.CC, params.CC_VERSION, params.ARCH)
def kci_core = "${env.WORKSPACE}/kernelci-core"
def kdir = "${env.WORKSPACE}/linux"
def checks = [:]
+ def docker_image = null
def params_summary = """\
Tree: ${params.KERNEL_TREE}
@@ -611,7 +632,7 @@ node("docker && bisection") {
Target: ${params.TARGET}
Lab: ${params.LAB}
Defconfig: ${params.DEFCONFIG}
- Compiler: ${params.CC} ${params.CC_VERSION}
+ Compiler: ${params.BUILD_ENVIRONMENT}
Plan: ${params.PLAN}"""
print("""\
Good: ${params.GOOD_COMMIT}
@@ -644,6 +665,13 @@ ${params_summary}""")
}
}
+ j.dockerPullWithRetry("${params.DOCKER_BASE}base").inside() {
+ j.cloneKciCore(kci_core, params.KCI_CORE_URL, params.KCI_CORE_BRANCH)
+ build_env_docker_image = j.dockerImageName(
+ kci_core, params.BUILD_ENVIRONMENT, params.ARCH)
+ docker_image = "${params.DOCKER_BASE}${build_env_docker_image}"
+ }
+
j.dockerPullWithRetry(docker_image).inside() {
try {
def valid_bisect = bisection(kci_core, kdir, checks)