catalyst-auto: pass current targets down to post_build

Commit b7e493b4e4 (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.
This commit is contained in:
Mike Frysinger 2018-01-15 20:52:14 -05:00
parent cb652173f6
commit f98bc791e6
9 changed files with 160 additions and 25 deletions

View file

@ -111,7 +111,8 @@ catalyst_var() {
} }
trigger_post_build() { trigger_post_build() {
if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then 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" send_email "Catalyst build error - post_build" "The post_build function failed" "${TMPDIR}/log/post_build.log"
exit 1 exit 1
fi fi
@ -365,7 +366,7 @@ run_catalyst_commands() {
send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}" send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}"
continue 2 continue 2
else else
trigger_post_build trigger_post_build "${a}" "${i}"
fi fi
done done
@ -377,7 +378,7 @@ run_catalyst_commands() {
send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}" send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}"
break break
else else
trigger_post_build trigger_post_build "${a}" "${i}"
fi fi
done done

View file

@ -35,6 +35,23 @@ update_symlinks() {
done done
} }
post_build() { upload() {
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: rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" alpha@nightheron.gentoo.org:
}
post_build() {
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
} }

View file

@ -38,8 +38,20 @@ update_symlinks() {
done done
} }
upload() {
rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" arm@nightheron.gentoo.org:
}
post_build() { post_build() {
rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2* arm@nightheron.gentoo.org: local set=$1 spec=$2
# Need to update this still.
pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null
case ${spec} in
stage3.spec)
upload stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2*
;;
esac
popd >/dev/null
} }

View file

@ -42,8 +42,34 @@ update_symlinks() {
done done
} }
post_build() { upload() {
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 rsync -e 'ssh -i /root/.ssh/buildsync.key' "$@" hppa@nightheron.gentoo.org:
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:
post_build() {
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
} }

View file

@ -35,7 +35,23 @@ update_symlinks() {
done done
} }
upload() {
rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ia64@nightheron.gentoo.org:
}
post_build() { 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
} }

View file

@ -37,6 +37,20 @@ update_symlinks() {
done done
} }
post_build() { upload() {
rsync -e 'ssh -i /root/.ssh/id_rsa' ${BUILD_SRCDIR_BASE}/builds/default/stage3-ppc-*${DATESTAMP}*.bz2* ppc@nightheron.gentoo.org: rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ppc@nightheron.gentoo.org:
}
post_build() {
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
} }

View file

@ -40,6 +40,23 @@ update_symlinks() {
done done
} }
post_build() { upload() {
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: rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" ppc@nightheron.gentoo.org:
}
post_build() {
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
} }

View file

@ -35,9 +35,25 @@ update_symlinks() {
done done
} }
upload() {
rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" s390@nightheron.gentoo.org:
}
post_build() { 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} local set=$1 spec=$2
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: 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
} }

View file

@ -35,9 +35,25 @@ update_symlinks() {
done done
} }
upload() {
rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" s390@nightheron.gentoo.org:
}
post_build() { 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} local set=$1 spec=$2
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: 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
} }