aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2018-01-15 20:52:14 -0500
committerMike Frysinger <vapier@gentoo.org>2018-01-15 20:52:14 -0500
commitf98bc791e6f6404707475877e4f469fb665c5f49 (patch)
tree4d8bc35b24cdf73f91a376a618e6d21e23d4dec6 /tools
parentcatalyst-auto: move remaining configs from pre_build to update_symlinks (diff)
downloadreleng-f98bc791e6f6404707475877e4f469fb665c5f49.tar.gz
releng-f98bc791e6f6404707475877e4f469fb665c5f49.tar.bz2
releng-f98bc791e6f6404707475877e4f469fb665c5f49.zip
catalyst-auto: pass current targets down to post_build
Commit b7e493b4e4ad6cf6f9367e4b139df042526c21de (run trigger_post_build after every successful spec) broke a lot of builders. The configs were written to be called only after everything was done, but by calling it after the first build (stage1 only), all the other artifacts we expected did not yet exist. Change post_build to pass the current set & spec name down so the config can figure out what is available at that point in time.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/catalyst-auto13
-rw-r--r--tools/catalyst-auto-alpha.conf19
-rw-r--r--tools/catalyst-auto-arm64.conf16
-rw-r--r--tools/catalyst-auto-hppa.conf32
-rw-r--r--tools/catalyst-auto-ia64.conf18
-rw-r--r--tools/catalyst-auto-ppc.conf16
-rw-r--r--tools/catalyst-auto-ppc64.conf21
-rw-r--r--tools/catalyst-auto-s390.conf22
-rw-r--r--tools/catalyst-auto-s390x.conf22
9 files changed, 157 insertions, 22 deletions
diff --git a/tools/catalyst-auto b/tools/catalyst-auto
index 750e7047..756bc515 100755
--- a/tools/catalyst-auto
+++ b/tools/catalyst-auto
@@ -111,10 +111,11 @@ catalyst_var() {
}
trigger_post_build() {
- if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then
- send_email "Catalyst build error - post_build" "The post_build function failed" "${TMPDIR}/log/post_build.log"
- exit 1
- fi
+ local set=$1 spec=$2
+ if ! run_cmd "${TMPDIR}/log/post_build.log" post_build "${set}" "${spec}"; then
+ send_email "Catalyst build error - post_build" "The post_build function failed" "${TMPDIR}/log/post_build.log"
+ exit 1
+ fi
}
parse_args() {
@@ -365,7 +366,7 @@ run_catalyst_commands() {
send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}"
continue 2
else
- trigger_post_build
+ trigger_post_build "${a}" "${i}"
fi
done
@@ -377,7 +378,7 @@ run_catalyst_commands() {
send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}"
break
else
- trigger_post_build
+ trigger_post_build "${a}" "${i}"
fi
done
diff --git a/tools/catalyst-auto-alpha.conf b/tools/catalyst-auto-alpha.conf
index 5b2bd2ed..585f8f23 100644
--- a/tools/catalyst-auto-alpha.conf
+++ b/tools/catalyst-auto-alpha.conf
@@ -35,6 +35,23 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" alpha@nightheron.gentoo.org:
+}
+
post_build() {
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/*${DATESTAMP}*.iso* alpha@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ installcd-stage2-minimal.spec)
+ upload *-${DATESTAMP}*.iso*
+ ;;
+ stage3.spec)
+ upload stage3-*${DATESTAMP}*.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-arm64.conf b/tools/catalyst-auto-arm64.conf
index e9744337..21617af7 100644
--- a/tools/catalyst-auto-arm64.conf
+++ b/tools/catalyst-auto-arm64.conf
@@ -38,8 +38,20 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" arm@nightheron.gentoo.org:
+}
post_build() {
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* arm@nightheron.gentoo.org:
- # Need to update this still.
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ stage3.spec)
+ upload stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-hppa.conf b/tools/catalyst-auto-hppa.conf
index 9899e7da..b7b41527 100644
--- a/tools/catalyst-auto-hppa.conf
+++ b/tools/catalyst-auto-hppa.conf
@@ -42,8 +42,34 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/buildsync.key' "$@" hppa@nightheron.gentoo.org:
+}
+
post_build() {
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-hppa1.1-${DATESTAMP}/netboot32-hppa.lif ${BUILD_SRCDIR_BASE}/builds/default/netboot2-hppa1.1-${DATESTAMP}/netboot-hppa32-${DATESTAMP}.lif
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-hppa2.0-${DATESTAMP}/netboot64-hppa.lif ${BUILD_SRCDIR_BASE}/builds/default/netboot2-hppa2.0-${DATESTAMP}/netboot-hppa64-${DATESTAMP}.lif
- rsync -e 'ssh -i /root/.ssh/buildsync.key' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/install-hppa-minimal-*${DATESTAMP}*.iso* ${BUILD_SRCDIR_BASE}/builds/default/netboot2-hppa*-${DATESTAMP}/*.lif hppa@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ netboot2-hppa32.spec)
+ mv netboot2-hppa1.1-${DATESTAMP}/netboot32-hppa.lif netboot2-hppa1.1-${DATESTAMP}/netboot-hppa32-${DATESTAMP}.lif
+ upload netboot2-hppa1.1-${DATESTAMP}/netboot-hppa32-${DATESTAMP}.lif
+ ;;
+ netboot2-hppa64.spec)
+ mv netboot2-hppa2.0-${DATESTAMP}/netboot64-hppa.lif netboot2-hppa2.0-${DATESTAMP}/netboot-hppa64-${DATESTAMP}.lif
+ upload netboot2-hppa2.0-${DATESTAMP}/netboot-hppa64-${DATESTAMP}.lif
+ ;;
+ installcd-stage2-minimal.spec)
+ upload install-hppa-minimal-*${DATESTAMP}*.iso*
+ ;;
+ hppa1.1/stage3.spec)
+ upload stage3-hppa1.1-*${DATESTAMP}*.bz2*
+ ;;
+ hppa2.0/stage3.spec)
+ upload stage3-hppa2.0-*${DATESTAMP}*.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-ia64.conf b/tools/catalyst-auto-ia64.conf
index dc91c4c4..ac8eee77 100644
--- a/tools/catalyst-auto-ia64.conf
+++ b/tools/catalyst-auto-ia64.conf
@@ -35,7 +35,23 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ia64@nightheron.gentoo.org:
+}
post_build() {
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/*${DATESTAMP}*.iso* ia64@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ installcd-stage2*)
+ upload *${DATESTAMP}*.iso*
+ ;;
+ stage3.spec)
+ upload stage3-*${DATESTAMP}*.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-ppc.conf b/tools/catalyst-auto-ppc.conf
index 139f1a1a..05a10ec6 100644
--- a/tools/catalyst-auto-ppc.conf
+++ b/tools/catalyst-auto-ppc.conf
@@ -36,7 +36,21 @@ update_symlinks() {
popd >/dev/null
done
}
+
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ppc@nightheron.gentoo.org:
+}
post_build() {
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-ppc-*${DATESTAMP}*.bz2* ppc@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ stage3.spec)
+ upload stage3-ppc-*${DATESTAMP}*.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-ppc64.conf b/tools/catalyst-auto-ppc64.conf
index d9c45856..dbe0c767 100644
--- a/tools/catalyst-auto-ppc64.conf
+++ b/tools/catalyst-auto-ppc64.conf
@@ -39,7 +39,24 @@ update_symlinks() {
popd >/dev/null
done
}
-
+
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ppc@nightheron.gentoo.org:
+}
+
post_build() {
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-ppc64-*${DATESTAMP}*.bz2* ${BUILD_SRCDIR_BASE}/builds/default/*${DATESTAMP}*.iso* ppc@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ installcd-stage2-minimal.spec)
+ upload *${DATESTAMP}*.iso*
+ ;;
+ stage3*.spec)
+ upload stage3-ppc64-*${DATESTAMP}*.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-s390.conf b/tools/catalyst-auto-s390.conf
index 44b47a93..560a38d3 100644
--- a/tools/catalyst-auto-s390.conf
+++ b/tools/catalyst-auto-s390.conf
@@ -35,9 +35,25 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" s390@nightheron.gentoo.org:
+}
post_build() {
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390-${DATESTAMP}/kernels/netboot ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390-${DATESTAMP}/netboot-s390-kernel-${DATESTAMP}
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390-${DATESTAMP}/kernels/misc/netboot.igz ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390-${DATESTAMP}/netboot-s390-initramfs-${DATESTAMP}
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390-${DATESTAMP}/netboot* s390@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ netboot/netboot.spec)
+ mv netboot2-s390-${DATESTAMP}/kernels/netboot netboot2-s390-${DATESTAMP}/netboot-s390-kernel-${DATESTAMP}
+ mv netboot2-s390-${DATESTAMP}/kernels/misc/netboot.igz netboot2-s390-${DATESTAMP}/netboot-s390-initramfs-${DATESTAMP}
+ upload netboot2-s390-${DATESTAMP}/netboot*
+ ;;
+ stage3.spec)
+ upload stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}
diff --git a/tools/catalyst-auto-s390x.conf b/tools/catalyst-auto-s390x.conf
index c12a959e..a01b9a81 100644
--- a/tools/catalyst-auto-s390x.conf
+++ b/tools/catalyst-auto-s390x.conf
@@ -35,9 +35,25 @@ update_symlinks() {
done
}
+upload() {
+ rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" s390@nightheron.gentoo.org:
+}
post_build() {
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390x-${DATESTAMP}/kernels/netboot64 ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390x-${DATESTAMP}/netboot-s390x-kernel-${DATESTAMP}
- mv ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390x-${DATESTAMP}/kernels/misc/netboot64.igz ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390x-${DATESTAMP}/netboot-s390x-initramfs-${DATESTAMP}
- rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* ${BUILD_SRCDIR_BASE}/builds/default/netboot2-s390x-${DATESTAMP}/netboot* s390@nightheron.gentoo.org:
+ local set=$1 spec=$2
+
+ pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
+
+ case ${spec} in
+ netboot/netboot.spec)
+ mv netboot2-s390x-${DATESTAMP}/kernels/netboot64 netboot2-s390x-${DATESTAMP}/netboot-s390x-kernel-${DATESTAMP}
+ mv netboot2-s390x-${DATESTAMP}/kernels/misc/netboot64.igz netboot2-s390x-${DATESTAMP}/netboot-s390x-initramfs-${DATESTAMP}
+ upload netboot2-s390x-${DATESTAMP}/netboot*
+ ;;
+ stage3.spec)
+ upload stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2*
+ ;;
+ esac
+
+ popd >/dev/null
}