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
1 file
+ 75
0
Compare changes
  • Side-by-side
  • Inline
+ 75
0
@@ -29,6 +29,8 @@ test_lava_credentials = 'apertis-lava-user'
demopack = "https://images.apertis.org/media/multimedia-demo.tar.gz"
installer_repo_url = "https://repositories.apertis.org/apertis/"
sysroot_url_prefix = image_url_prefix + "/sysroot/"
def architectures = [
@@ -122,6 +124,8 @@ def architectures = [
]
]
def installers = [ 'mx6sabrelite' ]
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),
@@ -380,6 +384,69 @@ def buildSysroot(architecture, type, debosarguments = "") {
}
}
def buildInstallers(installers) {
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: installers) {
try {
stage("${target} installer image") {
sh(script: """
mkdir -p ${PIPELINE_VERSION}/installer/${target}")
cd ${PIPELINE_VERSION}/installer/${target}
debos --show-boot \
-t target:${target} \
-t mirror:${installer_repo_url} \
-t suite:${release} \
-t timestamp:${PIPELINE_VERSION} \
-t image:u-boot-installer-${target} \
${WORKSPACE}/uboot-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
@@ -545,6 +612,14 @@ buildCandidates.each { name, arch ->
}
}
println("buildOnlyList:")
println(buildOnlyList)
if (buildOnlyList.containsValue("installers")) {
/* Add installer */
first_pass << [("$name $type"):
buildInstallers(installers)
]
}
parallel first_pass
parallel second_pass
Loading