Skip to content
Snippets Groups Projects

Wip/martyn/u boot installer

Merged Martyn Welch requested to merge WIP/martyn/u-boot_installer into apertis/v2019dev0
All threads resolved!
Compare and Show latest version
1 file
+ 70
47
Compare changes
  • Side-by-side
  • Inline
+ 73
0
@@ -125,6 +125,8 @@ def architectures = [
]
]
def installerTargets = [ 'mx6qsabrelite-uboot' ]
properties([
parameters([
string(name: 'buildOnly', defaultValue: '', description: 'If set, only the selected images are built. Comma and slash separated, e.g. armhf/minimal, amd64/target', trim: true),
@@ -390,6 +392,65 @@ def buildSysroot(architecture, type, debosarguments = "") {
}
}
def buildInstallers(installerTargets) {
return {
node("docker-slave") {
checkout scm
docker.withRegistry("https://${docker_registry_name}") {
buildenv = docker.image(docker_image_name)
/* Pull explicitly to ensure we have the latest */
buildenv.pull()
buildenv.inside("--device=/dev/kvm") {
stage("setup installers") {
env.PIPELINE_VERSION = VersionNumber(versionNumberString: '${BUILD_DATE_FORMATTED,"yyyyMMdd"}.${BUILDS_TODAY_Z}')
sh ("env ; mkdir -p ${PIPELINE_VERSION}/installer")
}
def buildStatus = [:]
try {
for(String target: installerTargets) {
try {
stage("${target} installer image") {
sh(script: """
mkdir -p ${PIPELINE_VERSION}/installer/${target}
cd ${PIPELINE_VERSION}/installer/${target}
debos --show-boot \
-t suite:${release} \
${WORKSPACE}/${target}-installer.yaml""")
}
buildStatus["installer-${target}"] = true
} catch (e) {
// If image build failed -- do not fail other types but do not need to start tests for it
buildStatus["installer-${target}"] = false
}
}
// Mark the whole pipeline as failed in case of failure at any stage
if (buildStatus.containsValue(false)) {
currentBuild.result = 'FAILURE'
// mark builds where some artifacts have failed to build
dir ("${env.PIPELINE_VERSION}/meta/") {
writeFile (file: "failed-installers", text: '')
}
}
// Upload artifacts
stage("installers upload") {
uploadDirectory (env.PIPELINE_VERSION, "installers/${release}")
}
} finally {
stage("Cleanup installers") {
deleteDir()
}
}
}
}
}
}
}
/**
* Build OSPack for architecture and start a parallel build of artifacts related
@@ -554,6 +615,18 @@ buildCandidates.each { name, arch ->
}
}
/* Add installer */
if (buildOnlyList) {
if (buildOnlyList.containsKey('installers')) {
first_pass << [("installers"):
buildInstallers(installerTargets)
]
}
} else {
first_pass << [("installers"):
buildInstallers(installerTargets)
]
}
parallel first_pass
parallel second_pass
Loading