diff options
-rw-r--r-- | jenkins/bisect.jpl | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl index bdda3fb..8dfdbbe 100644 --- a/jenkins/bisect.jpl +++ b/jenkins/bisect.jpl @@ -31,6 +31,8 @@ KERNEL_BRANCH Name of the branch to bisect in the kernel Git repository KERNEL_TREE Name of the kernel Git repository (tree) +KERNEL_NAME + Identifier of the kernel (typically `git describe`) GOOD_COMMIT Good known Git revision (SHA1 or any valid reference) BAD_COMMIT @@ -357,6 +359,44 @@ def bisectNext(kdir, status) { } /* ---------------------------------------------------------------------------- + * Results + */ + +def pushResults(kdir, checks, params_summary) { + def subject = "${params.KERNEL_TREE}/${params.KERNEL_BRANCH} ${params.PLAN} bisection: ${params.KERNEL_NAME} on ${params.TARGET} #${env.BUILD_NUMBER}" + + def lava_ci = env.WORKSPACE + '/lava-ci' + cloneLAVA_CI(lava_ci) + + dir(lava_ci) { + withCredentials([string(credentialsId: params.KCI_TOKEN_ID, + variable: 'SECRET')]) { + def egg_cache = eggCache() + sh(script: """ +PYTHON_EGG_CACHE=${egg_cache} \ +./push-bisection-results.py \ +--token=${SECRET} \ +--api=${params.KCI_API_URL} \ +--lab=${params.LAB} \ +--arch=${params.ARCH} \ +--defconfig=${params.DEFCONFIG} \ +--target=${params.TARGET} \ +--tree=${params.KERNEL_TREE} \ +--kernel=${params.KERNEL_NAME} \ +--branch=${params.KERNEL_BRANCH} \ +--good=${params.GOOD_COMMIT} \ +--bad=${params.BAD_COMMIT} \ +--verify=${checks['verify']} \ +--revert=${checks['revert']} \ +--kdir=${kdir} \ +--subject=\"${subject}\" \ +--to=${params.EMAIL_RECIPIENTS} \ +""") + } + } +} + +/* ---------------------------------------------------------------------------- * pipeline */ @@ -415,6 +455,7 @@ node("bisection") { Tree: ${params.KERNEL_TREE} URL: ${params.KERNEL_URL} Branch: ${params.KERNEL_BRANCH} + Kernel: ${params.KERNEL_NAME} Target: ${params.TARGET} Lab: ${params.LAB} Defconfig: ${params.DEFCONFIG} @@ -564,4 +605,8 @@ ${err} throw err } + + stage("Report") { + pushResults(kdir, checks, params_summary) + } } |