[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] Debian live-build: build all regular images
Holger Levsen (@holger)
gitlab at salsa.debian.org
Mon Jul 12 10:17:25 BST 2021
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
51fde8f5 by Roland Clobus at 2021-07-12T11:17:08+02:00
Debian live-build: build all regular images
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
4 changed files:
- bin/jenkins_master_wrapper.sh
- bin/jenkins_node_wrapper.sh
- bin/reproducible_debian_live_build.sh
- job-cfg/reproducible.yaml
Changes:
=====================================
bin/jenkins_master_wrapper.sh
=====================================
@@ -28,7 +28,7 @@ RETRIEVE_ARTIFACTS=no
# add some more params if needed,
# by default we just use the job name as param
case $JOB_NAME in
- rebootstrap_*|chroot-installation_*|haskell-package-plan)
+ rebootstrap_*|chroot-installation_*|haskell-package-plan|reproducible_debian_live_build_*)
PARAMS="$JOB_NAME $@"
;;
*) PARAMS="$JOB_NAME"
=====================================
bin/jenkins_node_wrapper.sh
=====================================
@@ -172,8 +172,8 @@ elif [ "$1" = "/srv/jenkins/bin/reproducible_build_archlinux_pkg.sh" ] && ( [ "$
exec /srv/jenkins/bin/reproducible_build_archlinux_pkg.sh "$2" "$3" "$4" "$5" "$6" ; croak "Exec failed";
elif [ "$1" = "/srv/jenkins/bin/reproducible_build_rpm.sh" ] && ( [ "$2" = "1" ] || [ "$2" = "2" ] ) ; then
exec /srv/jenkins/bin/reproducible_build_rpm.sh "$2" "$3" "$4" "$5" "$6" "$7" ; croak "Exec failed";
-elif [ "$1" = "reproducible_debian_live_build" ] ; then
- exec /srv/jenkins/bin/reproducible_debian_live_build.sh ; croak "Exec failed";
+elif [[ "$*" =~ ^reproducible_debian_live_build.* ]] ; then
+ shift; exec /srv/jenkins/bin/reproducible_debian_live_build.sh $@; croak "Exec failed";
elif [ "$*" = "some_jenkins_job_name" ] ; then
exec echo run any commands here ; croak "Exec failed";
fi
=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -23,7 +23,9 @@ output_echo() {
cleanup() {
# Cleanup the workspace
- sudo rm -rf --one-file-system /srv/workspace/live-build
+ if [ ! -z "${BUILDDIR}" ] ; then
+ sudo rm -rf --one-file-system ${BUILDDIR}
+ fi
# Cleanup the results
if [ ! -z "${RESULTSDIR}" ] ; then
rm -rf --one-file-system ${RESULTSDIR}
@@ -37,9 +39,32 @@ cleanup() {
# Cleanup if something goes wrong
trap cleanup INT TERM EXIT
+# Validate commandline arguments
+# Argument 1 = image type
+case $1 in
+ "smallest-build") export INSTALLER="none"; export PACKAGES=""; ;;
+ "cinnamon") export INSTALLER="live"; export PACKAGES="live-task-cinnamon"; ;;
+ "gnome") export INSTALLER="live"; export PACKAGES="live-task-gnome"; ;;
+ "kde") export INSTALLER="live"; export PACKAGES="live-task-kde"; ;;
+ "lxde") export INSTALLER="live"; export PACKAGES="live-task-lxde"; ;;
+ "lxqt") export INSTALLER="live"; export PACKAGES="live-task-lxqt"; ;;
+ "mate") export INSTALLER="live"; export PACKAGES="live-task-mate"; ;;
+ "standard") export INSTALLER="live"; export PACKAGES="live-task-standard"; ;;
+ "xfce") export INSTALLER="live"; export PACKAGES="live-task-xfce"; ;;
+ *) output_echo "Bad argument 1: $1"; exit 1; ;;
+esac
+export CONFIGURATION="$1"
+
+# Argument 2 = Debian version
+# No further validation required, reproducible.yaml should be correct
+if [ -z "$2" ] ; then
+ output_echo "Bad argument 2: it is empty"
+ exit 2
+fi
+export DEBIAN_VERSION="$2"
+
# Generate and use an isolated workspace
export PROJECTNAME="live-build"
-export CONFIGURATION="smallest-build"
mkdir -p /srv/workspace/live-build
export BUILDDIR=$(mktemp --tmpdir=/srv/workspace/live-build -d -t ${CONFIGURATION}.XXXXXXXX)
cd ${BUILDDIR}
@@ -67,8 +92,8 @@ lb config \
--parent-mirror-binary ${MIRROR} \
--security false \
--updates false \
- --distribution bullseye \
- --debian-installer none \
+ --distribution ${DEBIAN_VERSION} \
+ --debian-installer ${INSTALLER} \
--cache-packages false \
--apt-http-proxy ${http_proxy} \
2>&1 | tee $LB_OUTPUT
@@ -77,6 +102,10 @@ if [ "$RESULT" != "0" ] ; then
output_echo "Warning: lb config failed with $RESULT"
fi
+if [ ! -z "${PACKAGES}" ]; then
+ echo "${PACKAGES}" > config/package-lists/desktop.list.chroot
+fi
+
# Add additional hooks, that work around known reproducible issues
# Note: Keep the hooks in sync with https://wiki.debian.org/ReproducibleInstalls/LiveImages
cat > config/hooks/normal/1000-reproducible-function-uuid_generate_random.hook.chroot << EOF
=====================================
job-cfg/reproducible.yaml
=====================================
@@ -217,6 +217,10 @@
defaults: reproducible
name: '{name}_{my_task}'
+- job-template:
+ defaults: reproducible
+ name: 'reproducible_debian_live_build_{imagetype}_{debian_version}'
+
- job-template:
defaults: reproducible
name: '{name}_{my_task}_{my_arch}_{my_hname}'
@@ -587,11 +591,6 @@
my_timed: '23 23 * * *'
my_shell: '/srv/jenkins/bin/diffoscope_distribution_test.sh'
my_recipients: 'jenkins+reproducible-changes qa-jenkins-scm at lists.alioth.debian.org'
- - 'debian_live_build':
- my_description: 'Build Debian live image using live-build'
- my_timed: '55 11 * * *'
- my_hname: 'osuosl173'
- my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh'
- 'openwrt_rebuilder_today':
my_description: 'Rebuild an OpenWrt snapshot or a release today.'
my_hname: 'osuosl171'
@@ -931,3 +930,28 @@
my_hname: ''
my_disabled: true
+- project:
+ name: reproducible_debian_live_build
+ my_recipients: 'qa-jenkins-scm at lists.alioth.debian.org'
+ my_node: '{my_hname}'
+ my_naginator_regex: 'dummyshouldneverhappen'
+ my_timeout: '720'
+ imagetype:
+ - "smallest-build"
+ - cinnamon
+ - gnome
+ - kde
+ - lxde
+ - lxqt
+ - mate
+ - standard
+ - xfce
+ debian_version:
+ - bullseye
+ jobs:
+ - 'reproducible_debian_live_build_{imagetype}_{debian_version}':
+ my_description: 'Build Debian {imagetype} live image for {debian_version} using live-build'
+ my_timed: '55 11 * * *'
+ my_hname: 'osuosl173'
+ my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh {imagetype} {debian_version}'
+
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/51fde8f5c5633ce434e0d6ac2798516bea9a3c8b
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/51fde8f5c5633ce434e0d6ac2798516bea9a3c8b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210712/866abb38/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list