summaryrefslogtreecommitdiffstats
path: root/tools/builder_common.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-25 09:39:23 -0200
committerRenato Botelho <renato@netgate.com>2015-11-25 09:39:23 -0200
commit919c84863cbf711b9335cf265771ad8a5fe750e6 (patch)
tree5ea190b32d133aa49b85c12a6d3256c0088946ed /tools/builder_common.sh
parent9447077e3f9e3e90d5afd5aa223348e71cd1350a (diff)
downloadpfsense-919c84863cbf711b9335cf265771ad8a5fe750e6.zip
pfsense-919c84863cbf711b9335cf265771ad8a5fe750e6.tar.gz
Teach build_snapshots to deal with poudriere builds
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r--tools/builder_common.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index c87010d..077cf7f 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -2048,18 +2048,23 @@ poudriere_bulk() {
# and we scp the log file to the builder host if
# needed for the real time logging functions.
snapshots_update_status() {
- if [ -z "${SNAPSHOTS}" -o -z "$1" ]; then
+ if [ -z "$1" ]; then
+ return
+ fi
+ if [ -z "${SNAPSHOTS}" -a -z "${POUDRIERE_SNAPSHOTS}" ]; then
return
fi
echo $1
echo "`date` -|- $1" >> $SNAPSHOTSLOGFILE
- if [ -z "${DO_NOT_UPLOAD}" -a -n "${RSYNCIP}" ]; then
- LU=`cat $SNAPSHOTSLASTUPDATE`
- CT=`date "+%H%M%S"`
+ if [ -z "${DO_NOT_UPLOAD}" -a -n "${SNAPSHOTS_RSYNCIP}" ]; then
+ LU=$(cat $SNAPSHOTSLASTUPDATE 2>/dev/null)
+ CT=$(date "+%H%M%S")
# Only update every minute
if [ "$LU" != "$CT" ]; then
- ssh ${RSYNCUSER}@${RSYNCIP} "mkdir -p ${RSYNCLOGS}"
- scp -q $SNAPSHOTSLOGFILE ${RSYNCUSER}@${RSYNCIP}:${RSYNCLOGS}/build.log
+ ssh ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP} \
+ "mkdir -p ${SNAPSHOTS_RSYNCLOGS}"
+ scp -q $SNAPSHOTSLOGFILE \
+ ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP}:${SNAPSHOTS_RSYNCLOGS}/build.log
date "+%H%M%S" > $SNAPSHOTSLASTUPDATE
fi
fi
@@ -2068,8 +2073,9 @@ snapshots_update_status() {
# Copy the current log file to $filename.old on
# the snapshot www server (real time logs)
snapshots_rotate_logfile() {
- if [ -z "${DO_NOT_UPLOAD}" -a -n "${RSYNCIP}" ]; then
- scp -q $SNAPSHOTSLOGFILE ${RSYNCUSER}@${RSYNCIP}:${RSYNCLOGS}/build.log.old
+ if [ -z "${DO_NOT_UPLOAD}" -a -n "${SNAPSHOTS_RSYNCIP}" ]; then
+ scp -q $SNAPSHOTSLOGFILE \
+ ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP}:${SNAPSHOTS_RSYNCLOGS}/build.log.old
fi
# Cleanup log file
OpenPOWER on IntegriCloud