2015-04-20 11:41:47 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
now () {
|
|
|
|
date -u +%F:%H:%M:%S
|
|
|
|
}
|
|
|
|
|
|
|
|
START=`now`
|
|
|
|
ERROR=0
|
|
|
|
if [ "$NOLIVE"x = ""x ] ; then
|
2017-06-06 12:10:48 +00:00
|
|
|
echo " Running debian live build"
|
2015-04-20 11:41:47 +00:00
|
|
|
~/live/bin/run-live
|
|
|
|
ERROR=$?
|
|
|
|
if [ $ERROR -eq 0 ] ; then
|
|
|
|
if [ "$RELEASE_BUILD"x = ""x ] ; then
|
2017-06-06 12:10:48 +00:00
|
|
|
~/build.stretch/sign-images /mnt/nfs-cdimage/.live/new/free ""
|
2015-04-20 11:41:47 +00:00
|
|
|
mv -f /mnt/nfs-cdimage/weekly-live-builds /mnt/nfs-cdimage/weekly-live-builds.old
|
|
|
|
mv /mnt/nfs-cdimage/.live/new/free/ /mnt/nfs-cdimage/weekly-live-builds
|
|
|
|
rm -rf /mnt/nfs-cdimage/weekly-live-builds.old
|
|
|
|
|
2017-06-06 12:10:48 +00:00
|
|
|
~/build.stretch/sign-images /mnt/nfs-cdimage/.live/new/non-free ""
|
2015-04-20 11:41:47 +00:00
|
|
|
mv -f ${CD_I_F}/weekly-live-builds ${CD_I_F}/weekly-live-builds.old
|
|
|
|
mv /mnt/nfs-cdimage/.live/new/non-free ${CD_I_F}/weekly-live-builds
|
|
|
|
rm -rf ${CD_I_F}/weekly-live-builds.old
|
|
|
|
else
|
|
|
|
mkdir -p /mnt/nfs-cdimage/.${RELEASE_BUILD}/
|
2017-06-06 12:10:48 +00:00
|
|
|
rm -rf /mnt/nfs-cdimage/.${RELEASE_BUILD}/live-*
|
2015-04-20 11:41:47 +00:00
|
|
|
mv /mnt/nfs-cdimage/.live/new/free/ /mnt/nfs-cdimage/.${RELEASE_BUILD}/live-free
|
|
|
|
mv /mnt/nfs-cdimage/.live/new/non-free /mnt/nfs-cdimage/.${RELEASE_BUILD}/live-non-free
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
# Wait for the KVM to shut down cleanly
|
|
|
|
sleep 30
|
|
|
|
fi
|
|
|
|
END=`now`
|
2017-06-06 12:10:48 +00:00
|
|
|
if [ "$PUBDIRLIVETRACE"x != ""x ] ; then
|
|
|
|
echo -e "start=$START\nend=$END\nerror=$ERROR\nlogfile=\n" > $PUBDIRLIVETRACE
|
|
|
|
fi
|
|
|
|
|
|
|
|
START=`now`
|
|
|
|
ERROR=0
|
|
|
|
if [ "$NOOPENSTACK"x = ""x ] ; then
|
|
|
|
echo " Running openstack builds"
|
|
|
|
if [ "$NOOPENSTACKamd64"x = ""x ] ; then
|
|
|
|
~/live/bin/run-openstack amd64
|
|
|
|
ERROR=$(($ERROR + $?))
|
|
|
|
# Wait for the VM to shut down cleanly
|
|
|
|
sleep 30
|
|
|
|
fi
|
|
|
|
if [ "$NOOPENSTACKarm64"x = ""x ] ; then
|
|
|
|
~/live/bin/run-openstack arm64
|
|
|
|
ERROR=$(($ERROR + $?))
|
|
|
|
# Wait for the VM to shut down cleanly
|
|
|
|
sleep 30
|
|
|
|
fi
|
|
|
|
if [ $ERROR -eq 0 ] ; then
|
|
|
|
mkdir -p /mnt/nfs-cdimage/.live/new/openstack-stretch
|
|
|
|
mv -v /mnt/nfs-cdimage/.live/new/openstack-stretch-*/*.* /mnt/nfs-cdimage/.live/new/openstack-stretch
|
|
|
|
for SUM in MD5 SHA1 SHA256 SHA512; do
|
|
|
|
cat /mnt/nfs-cdimage/.live/new/openstack-stretch-*/${SUM}SUMS > /mnt/nfs-cdimage/.live/new/openstack-stretch/${SUM}SUMS
|
|
|
|
done
|
|
|
|
if [ "$RELEASE_BUILD"x = ""x ] ; then
|
|
|
|
~/build.stretch/sign-images /mnt/nfs-cdimage/.live/new/openstack-stretch ""
|
|
|
|
mv /mnt/nfs-cdimage/.live/new/openstack-stretch/* /mnt/nfs-cdimage/openstack/testing
|
|
|
|
cp ~/build.stretch/openstack-header.html /mnt/nfs-cdimage/openstack/testing/HEADER.html
|
|
|
|
else
|
|
|
|
mkdir -p /mnt/nfs-cdimage/.${RELEASE_BUILD}
|
|
|
|
rm -rf /mnt/nfs-cdimage/.${RELEASE_BUILD}/openstack
|
|
|
|
mv /mnt/nfs-cdimage/.live/new/openstack-stretch /mnt/nfs-cdimage/.${RELEASE_BUILD}/openstack
|
|
|
|
cp ~/build.stretch/openstack-header.html /mnt/nfs-cdimage/.${RELEASE_BUILD}/openstack/HEADER.html
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
END=`now`
|
|
|
|
if [ "$PUBDIROSTRACE"x != ""x ] ; then
|
|
|
|
echo -e "start=$START\nend=$END\nerror=$ERROR\nlogfile=\n" > $PUBDIROSTRACE
|
|
|
|
fi
|
2015-04-20 11:41:47 +00:00
|
|
|
|
|
|
|
exit 0
|