Commit 2ddf5dac authored by Angus Ainslie (Purism)'s avatar Angus Ainslie (Purism)
Browse files

Jenkinsfile: allow jenkins to specify the u-boot and kernel urls


Signed-off-by: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
parent 1f9c2e04
...@@ -12,6 +12,8 @@ node { ...@@ -12,6 +12,8 @@ node {
string(name: 'dist', defaultValue: "buster+ci", description: 'What distribuition to build for?') string(name: 'dist', defaultValue: "buster+ci", description: 'What distribuition to build for?')
string(name: 'build_type', defaultValue: "unstable", description: 'What type of build is this?') string(name: 'build_type', defaultValue: "unstable", description: 'What type of build is this?')
string(name: 'publish', defaultValue: "false", description: 'Should the image get published?') string(name: 'publish', defaultValue: "false", description: 'Should the image get published?')
string(name: 'kernel_url', defaultValue: "", description: 'The URL of the kernel')
string(name: 'uboot_url', defaultValue: "", description: 'The URL for u-boot')
} }
if (build_on_x86.contains(params.board)) { if (build_on_x86.contains(params.board)) {
...@@ -43,7 +45,7 @@ node { ...@@ -43,7 +45,7 @@ node {
} }
stage('Publish') { stage('Publish') {
if( "${params.publish}"=="true" ) { if( "${params.publish}"=="true" ) {
sh "make DIST='${params.dist}' BOARD='${params.board}' TYPE='${params.build_type}' sha256sums" sh "make DIST='${params.dist}' BOARD='${params.board}' TYPE='${params.build_type}' KERNEL_URL='${params.kernel_url}' UBOOT_URL='${params.uboot_url}' sha256sums"
sh "bin/publish_ci_files -t image -T ${params.build_type} ${params.board}.img.xz sha256sums" sh "bin/publish_ci_files -t image -T ${params.build_type} ${params.board}.img.xz sha256sums"
} else { } else {
echo 'This image will not be published' echo 'This image will not be published'
......
...@@ -120,7 +120,7 @@ NULL= ...@@ -120,7 +120,7 @@ NULL=
fdt_file= fdt_file=
uboot_type= uboot_type=
# The URL to download the (unpackged) uboot binaries from # The URL to download the (unpackged) uboot binaries from
uboot_url= uboot_url=${UBOOT_URL:-}
build_tarball= build_tarball=
want_qcow2= want_qcow2=
want_boot_image= want_boot_image=
...@@ -128,7 +128,7 @@ apt_sources= ...@@ -128,7 +128,7 @@ apt_sources=
debootstrap_dist= debootstrap_dist=
kernel_deb= kernel_deb=
# The URL to download the kernel deb from # The URL to download the kernel deb from
kernel_url= kernel_url=${KERNEL_URL:-}
custom_package_opt= custom_package_opt=
# Extra board specific packages to install # Extra board specific packages to install
board_packages= board_packages=
...@@ -168,7 +168,13 @@ distro="${distro/+ci}" ...@@ -168,7 +168,13 @@ distro="${distro/+ci}"
mainimg="${pureos_board}.img" mainimg="${pureos_board}.img"
# remember command line setting
_kernel_url="${kernel_url}"
_uboot_url="${uboot_url}"
. conf/board . conf/board
# make sure command line setting takes precedenc over configuration file
[ -z "${_kernel_url}" ] || kernel_url="${_kernel_url}"
[ -z "${_uboot_url}" ] || uboot_url="${_uboot_url}"
. conf/packages . conf/packages
# shellcheck source=conf/dists/buster # shellcheck source=conf/dists/buster
. conf/dists/"${distro}" . conf/dists/"${distro}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment