Skip to content

Commit

Permalink
builder: sudo rm ./deploy, only need one keep_net_alive
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Sep 24, 2015
1 parent b9d5963 commit a966a4f
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions publish/bb.org_4gb_stable.sh
Expand Up @@ -10,17 +10,10 @@ server_dir="/var/lib/buildbot/masters/kernel-buildbot/public_html/images/${branc

export apt_proxy=localhost:3142/

refresh_keep_net_alive () {
while : ; do
sleep 15
echo "log: [Running: ./publish/bb.org_4gb_stable.sh]"
done
}

keep_net_alive () {
while : ; do
sleep 15
echo "size: [`ls -lh ./bone-${image_name}-${size}.img.xz`]"
echo "log: [Running: ./publish/bb.org_4gb_stable.sh]"
done
}

Expand All @@ -35,8 +28,6 @@ build_and_upload_image () {
sudo chown buildbot.buildbot bone-${image_name}-${size}.img
sudo chown buildbot.buildbot bone-${image_name}-${size}.img.xz.job.txt

keep_net_alive & KEEP_NET_ALIVE_PID=$!

sync ; sync ; sleep 5

bmaptool create -o bone-${image_name}-${size}.bmap bone-${image_name}-${size}.img
Expand All @@ -51,17 +42,15 @@ build_and_upload_image () {
rsync -e ssh -av ./bone-${image_name}-${size}.img.xz.job.txt ${ssh_user}:${server_dir}/
rsync -e ssh -av ./bone-${image_name}-${size}.img.xz.sha256sum ${ssh_user}:${server_dir}/

[ -e /proc/$KEEP_NET_ALIVE_PID ] && sudo kill $KEEP_NET_ALIVE_PID

#cleanup:
cd ../../
rm -rf ./deploy/ || true
sudo rm -rf ./deploy/ || true
fi
fi
}

refresh_keep_net_alive & REFRESH_KEEP_NET_ALIVE_PID=$!
echo "pid: [${REFRESH_KEEP_NET_ALIVE_PID}]"
keep_net_alive & KEEP_NET_ALIVE_PID=$!
echo "pid: [${KEEP_NET_ALIVE_PID}]"

## Stable/shipping
##Debian 7:
Expand Down Expand Up @@ -98,5 +87,5 @@ options="--img-2gb bone-${image_name} --dtb beaglebone \
./RootStock-NG.sh -c bb.org-debian-jessie-tester-2gb-v4.1
build_and_upload_image

[ -e /proc/$REFRESH_KEEP_NET_ALIVE_PID ] && sudo kill $REFRESH_KEEP_NET_ALIVE_PID
[ -e /proc/$KEEP_NET_ALIVE_PID ] && sudo kill $KEEP_NET_ALIVE_PID

0 comments on commit a966a4f

Please sign in to comment.