From 20916b48c608c2bc60743e85eaa3e790a1b84bcd Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 8 Dec 2024 08:09:23 -0600 Subject: [PATCH] ci: Persist build logs --- ci/Jenkinsfile | 9 +++++++++ lib/common.sh | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index d12ee0d..6590579 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -53,5 +53,14 @@ pipeline { } } } + + } + + post { + failure { + dir('tmp/portage') { + archiveArtifacts '*/*/temp/*.log' + } + } } } diff --git a/lib/common.sh b/lib/common.sh index f4acc2b..15edcd1 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -6,10 +6,11 @@ buildah_run_script() { shift script=$(readlink -f "$1") shift - mkdir -p binpkgs + mkdir -p binpkgs tmp buildah run \ --mount type=cache,target=/var/db/repos/gentoo \ --mount type=cache,target=/var/cache \ + --mount type=bind,src="${PWD}"/tmp,target=/var/tmp,rw,z \ --mount type=bind,src="${PWD}"/binpkgs,target=/var/cache/binpkgs,rw,z \ --mount type=bind,src="${script}",target=/run/script,ro,z \ --tty=false \