Skip to content
Snippets Groups Projects

Add example recipes to build a single image

Merged Frederic Danis requested to merge fdanis/apertis-image-recipes:T5675 into apertis/v2019dev0
1 unresolved thread
1 file
+ 13
10
Compare changes
  • Side-by-side
  • Inline
+ 13
10
@@ -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)
]
}
}
Loading