diff options
author | Ana Guerrero Lopez <ana.guerrero@collabora.com> | 2018-09-06 14:33:11 +0200 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2018-09-17 15:10:26 +0100 |
commit | cf2bd6e0b149ac83ca0af3dce62632daef51b9f1 (patch) | |
tree | b16e811a12af330a6417d1e1df9caa4833ea1f70 /src | |
parent | 1b72a8da9183ffee800f90555b6adfb016b334d3 (diff) |
debian.rootfs library: allow to choose the Debian release for the rootfs
The debos recipe can be used with other debian releases besides stretch.
Rename the recipe file from stretch.yaml to rootfs.yaml and add a new
parameter when using the library to specify the debian release.
Signed-off-by: Ana Guerrero Lopez <ana.guerrero@collabora.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/org/kernelci/debian/RootFS.groovy | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/kernelci/debian/RootFS.groovy b/src/org/kernelci/debian/RootFS.groovy index 83f8a42..2891e73 100644 --- a/src/org/kernelci/debian/RootFS.groovy +++ b/src/org/kernelci/debian/RootFS.groovy @@ -39,8 +39,9 @@ def buildImage(config) { def name = config.name def archList = config.arch_list + def debianRelease = config.debian_release - def debosFile = "jenkins/debian/debos/stretch.yaml" + def debosFile = "jenkins/debian/debos/rootfs.yaml" // Returns the pipeline version with the format YYYYMMMAA.X where X is the number of the build of the day def pipeline_version = VersionNumber(versionNumberString: '${BUILD_DATE_FORMATTED,"yyyyMMdd"}.${BUILDS_TODAY_Z}') @@ -62,6 +63,7 @@ def buildImage(config) { def buildStep = "Build image for ${arch}" stepsForParallel[buildStep] = makeImageStep(pipeline_version, arch, + debianRelease, debosFile, extraPackages, name, @@ -72,7 +74,7 @@ def buildImage(config) { } -def makeImageStep(String pipeline_version, String arch, String debosFile, String extraPackages, String name, String script) { +def makeImageStep(String pipeline_version, String arch, String debianRelease, String debosFile, String extraPackages, String name, String script) { return { node('builder' && 'docker') { stage("Checkout") { @@ -83,7 +85,7 @@ def makeImageStep(String pipeline_version, String arch, String debosFile, String stage("Build base image for ${arch}") { sh """ mkdir -p ${pipeline_version}/${arch} - debos -t architecture:${arch} -t basename:${pipeline_version}/${arch} -t extra_packages:'${extraPackages}' -t script:${script} ${debosFile} + debos -t architecture:${arch} -t suite:${debianRelease} -t basename:${pipeline_version}/${arch} -t extra_packages:'${extraPackages}' -t script:${script} ${debosFile} """ archiveArtifacts artifacts: "${pipeline_version}/${arch}/initrd.cpio.gz", fingerprint: true archiveArtifacts artifacts: "${pipeline_version}/${arch}/rootfs.cpio.gz", fingerprint: true |