From f3e3089699fbea587981a02e98c4116a4fb402d1 Mon Sep 17 00:00:00 2001 From: Emanuele Aina <emanuele.aina@collabora.com> Date: Fri, 22 Feb 2019 12:06:16 +0100 Subject: [PATCH] Jenkinsfile: Build the lxc-ostree containers only for amd64-minimal Speed things up and reduce resource consumption on a component that is currently not a priority. Signed-off-by: Emanuele Aina <emanuele.aina@collabora.com> --- Jenkinsfile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7ae5c6ac..d514a7ce 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,7 @@ def architectures = [ image: true, sysroot: false, ostree: true, + lxc: true, ], target: [ args: "-t demopack:${demopack}", @@ -383,7 +384,7 @@ def buildSysroot(architecture, type, debosarguments = "") { * * @boards -- array with board names */ -def buildImages(architecture, type, boards, debosarguments = "", image = true, sysroot = false, ostree = false, production = false) { +def buildImages(architecture, type, boards, debosarguments = "", image = true, sysroot = false, ostree = false, lxc = false, production = false) { return { node("docker-slave") { checkout scm @@ -437,13 +438,15 @@ def buildImages(architecture, type, boards, debosarguments = "", image = true, s } } - /* Create ostree and tarball for container (board name = lxc) */ - try { - buildContainer(architecture, type, "lxc", debosarguments) - buildStatus["lxc-ostree"] = true - } catch (e) { - // If image build failed -- do not fail other types but do not need to start tests for it - buildStatus["lxc-ostree"] = false + if (lxc) { + /* Create ostree and tarball for container (board name = lxc) */ + try { + buildContainer(architecture, type, "lxc", debosarguments) + buildStatus["lxc-ostree"] = true + } catch (e) { + // If image build failed -- do not fail other types but do not need to start tests for it + buildStatus["lxc-ostree"] = false + } } } @@ -526,12 +529,12 @@ buildCandidates.each { name, arch -> if (!params.requires) { /* first, build all jobs which don’t have any dependencies, in parallel */ first_pass << [("$name $type"): - buildImages(name, type, merged.boards, merged.args, merged.image, merged.sysroot, merged.ostree, production) + buildImages(name, type, merged.boards, merged.args, merged.image, merged.sysroot, merged.ostree, merged.lxc, production) ] } else { /* second, build any jobs which depend on jobs from the first pass, also in parallel */ second_pass << [("$name $type"): - buildImages(name, type, merged.boards, merged.args, merged.image, merged.sysroot, merged.ostree, production) + buildImages(name, type, merged.boards, merged.args, merged.image, merged.sysroot, merged.ostree, merged.lxc, production) ] } } -- GitLab