aboutsummaryrefslogtreecommitdiff
path: root/jenkins
diff options
context:
space:
mode:
authorGuillaume Tucker <guillaume.tucker@collabora.com>2018-12-20 15:36:20 +0000
committerGuillaume Tucker <guillaume.tucker@collabora.com>2019-02-13 16:04:24 +0000
commita93e8eed4491ff4e12975c5403989ad1c43a0077 (patch)
tree1bd98606bd6c38bb4ed4da9a2c52a7472139bff6 /jenkins
parent1b7c5dad763fbb6c8f38523c596c1db437c38c57 (diff)
org.kernelci.job: add .cloneKciCore() and clean-up
Move org.kernelci.build.cloneKciCore() to org.kernelci.job as this is not specific to build jobs but other jobs too. Also clean-up the code using cloneKciCore(). Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'jenkins')
-rw-r--r--jenkins/bisect.jpl12
-rw-r--r--jenkins/build-trigger.jpl15
-rw-r--r--jenkins/build.jpl11
3 files changed, 18 insertions, 20 deletions
diff --git a/jenkins/bisect.jpl b/jenkins/bisect.jpl
index 617b91b..55bc24c 100644
--- a/jenkins/bisect.jpl
+++ b/jenkins/bisect.jpl
@@ -170,8 +170,8 @@ fi
*/
def cloneKciCore(kci_core) {
- def k = new Kernel()
- k.cloneKciCore(kci_core, params.KCI_CORE_URL, params.KCI_CORE_BRANCH)
+ def j = new Job()
+ j.cloneKciCore(kci_core, params.KCI_CORE_URL, params.KCI_CORE_BRANCH)
}
def cloneLinux(kdir) {
@@ -595,8 +595,8 @@ node("docker && bisection") {
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 kci_core = "${env.WORKSPACE}/kernelci-core"
+ def kdir = "${env.WORKSPACE}/linux"
def checks = [:]
def params_summary = """\
@@ -608,10 +608,10 @@ node("docker && bisection") {
Lab: ${params.LAB}
Defconfig: ${params.DEFCONFIG}
Plan: ${params.PLAN}"""
- echo """\
+ print("""\
Good: ${params.GOOD_COMMIT}
Bad: ${params.BAD_COMMIT}
-${params_summary}"""
+${params_summary}""")
if ((params.PLAN != 'boot') && (params.PLAN != 'simple')) {
echo "Only doing boot and simple plans for now, aborting."
diff --git a/jenkins/build-trigger.jpl b/jenkins/build-trigger.jpl
index 061639a..b46326a 100644
--- a/jenkins/build-trigger.jpl
+++ b/jenkins/build-trigger.jpl
@@ -241,9 +241,14 @@ def buildsComplete(job, arch) {
}
node("defconfig-creator") {
+ def j = new Job()
+ def k = new Kernel()
+ def kci_core = "${env.WORKSPACE}/kernelci-core"
+ def kdir = "${env.WORKSPACE}/linux"
def archs = params.ARCH_LIST.tokenize(' ')
+ def arch_configs = []
- echo("""\
+ print("""\
Tree: ${params.TREE_NAME}
URL: ${params.TREE}
Branch: ${params.BRANCH}
@@ -251,14 +256,10 @@ node("defconfig-creator") {
Revision: ${params.COMMIT_ID}
Archs: ${archs.size()}""")
- def k = new Kernel()
- def kci_core = env.WORKSPACE + '/kernelci-core'
- def kdir = env.WORKSPACE + '/linux'
-
stage("Init") {
timeout(time: 30, unit: 'MINUTES') {
parallel(
- clone: { k.cloneKciCore(kci_core,
+ clone: { j.cloneKciCore(kci_core,
params.KCI_CORE_URL,
params.KCI_CORE_BRANCH) },
download: { k.downloadTarball(kdir, params.SRC_TARBALL) },
@@ -266,8 +267,6 @@ node("defconfig-creator") {
}
}
- def arch_configs = []
-
stage("Configs") {
for (String arch: archs) {
def configs = ["allnoconfig"]
diff --git a/jenkins/build.jpl b/jenkins/build.jpl
index 08c6769..cb5b589 100644
--- a/jenkins/build.jpl
+++ b/jenkins/build.jpl
@@ -100,10 +100,13 @@ ${kci_core}/build.py \
node("docker && builder") {
def j = new Job()
+ def k = new Kernel()
+ def kci_core = "${env.WORKSPACE}/kernelci-core"
+ def kdir = "${env.WORKSPACE}/linux"
def docker_image = j.dockerImageName(
params.DOCKER_BASE, params.CC, params.CC_VERSION, params.ARCH)
- echo("""\
+ print("""\
Tree: ${params.TREE_NAME}
URL: ${params.TREE}
Branch: ${params.BRANCH}
@@ -114,14 +117,10 @@ node("docker && builder") {
Compiler: ${params.CC} ${params.CC_VERSION}
Container: ${docker_image}""")
- def k = new Kernel()
- def kci_core = env.WORKSPACE + '/kernelci-core'
- def kdir = env.WORKSPACE + '/linux'
-
stage("Init") {
timeout(time: 30, unit: 'MINUTES') {
parallel(
- clone: { k.cloneKciCore(kci_core,
+ clone: { j.cloneKciCore(kci_core,
params.KCI_CORE_URL,
params.KCI_CORE_BRANCH) },
download: { k.downloadTarball(kdir, params.SRC_TARBALL) },