aboutsummaryrefslogtreecommitdiff
path: root/jenkins/bisect.jpl
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2017-12-01 14:04:17 +0000
committerGuillaume Tucker <guillaume.tucker@collabora.com>2018-06-28 10:15:14 +0100
commitf94df7ecd59f168cf3de692bdf3cefbc1dc29fc5 (patch)
treebf8a64a4e73ece27ed7987a952191d238f0c74c9 /jenkins/bisect.jpl
parent6ecfcde1fd214f405edf6557f19ea3c19c6cc30a (diff)
bisect.jpl: call push-bisection-results.py to push log and results
Call publish-bisection-results.py in a Report stage at the end of a successful bisection to push the report log as well as the associated results meta-data. Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins/bisect.jpl')
-rw-r--r--jenkins/bisect.jpl45
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)
+ }
}