Project

General

Profile

« Previous | Next » 

Revision ba84d2fc

Added by Renato Botelho almost 9 years ago

Do not scp log files

View differences:

build.conf.sample
37 37
#export RSYNCIP="your.snapshot.server"
38 38
#export RSYNCUSER="username"
39 39
#export RSYNCPATH="/usr/local/www/snapshots"
40
#export RSYNCLOGS="/usr/local/www/snapshots/logs"
41 40

  
42 41
# rsync data to upload pkg repo
43 42
#export PKG_RSYNC_HOSTNAME="pkg_repo_hostname"
build.sh
261 261
		RSYNCIP \
262 262
		RSYNCUSER \
263 263
		RSYNCPATH \
264
		RSYNCLOGS \
265 264
		PKG_RSYNC_HOSTNAME \
266 265
		PKG_RSYNC_USERNAME \
267 266
		PKG_RSYNC_SSH_PORT \
tools/builder_common.sh
2063 2063

  
2064 2064
# This routine is called to write out to stdout
2065 2065
# a string. The string is appended to $SNAPSHOTSLOGFILE
2066
# and we scp the log file to the builder host if
2067
# needed for the real time logging functions.
2068 2066
snapshots_update_status() {
2069 2067
	if [ -z "$1" ]; then
2070 2068
		return
......
2074 2072
	fi
2075 2073
	echo "$*"
2076 2074
	echo "`date` -|- $*" >> $SNAPSHOTSLOGFILE
2077
	if [ -z "${DO_NOT_UPLOAD}" -a -n "${SNAPSHOTS_RSYNCIP}" ]; then
2078
		LU=$(cat $SNAPSHOTSLASTUPDATE 2>/dev/null)
2079
		CT=$(date "+%H%M%S")
2080
		# Only update every minute
2081
		if [ "$LU" != "$CT" ]; then
2082
			ssh ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP} \
2083
				"mkdir -p ${SNAPSHOTS_RSYNCLOGS}"
2084
			scp -q $SNAPSHOTSLOGFILE \
2085
				${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP}:${SNAPSHOTS_RSYNCLOGS}/build.log
2086
			date "+%H%M%S" > $SNAPSHOTSLASTUPDATE
2087
		fi
2088
	fi
2089 2075
}
2090 2076

  
2091 2077
create_sha256() {
tools/builder_defaults.sh
349 349
# Rsync data to send snapshots
350 350
export RSYNCUSER=${RSYNCUSER:-"snapshots"}
351 351
export RSYNCPATH=${RSYNCPATH:-"/usr/local/www/snapshots/${TARGET}/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}"}
352
export RSYNCLOGS=${RSYNCLOGS:-"/usr/local/www/snapshots/logs/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}/${TARGET}"}
353 352
export RSYNCKBYTELIMIT=${RSYNCKBYTELIMIT:-"248000"}
354 353

  
355 354
export SNAPSHOTSLOGFILE=${SNAPSHOTSLOGFILE:-"${SCRATCHDIR}/snapshots-build.log"}
......
358 357
if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
359 358
	export SNAPSHOTS_RSYNCIP=${PKG_RSYNC_HOSTNAME}
360 359
	export SNAPSHOTS_RSYNCUSER=${PKG_RSYNC_USERNAME}
361
	export SNAPSHOTS_RSYNCLOGS=${PKG_RSYNC_LOGS}
362 360
else
363 361
	export SNAPSHOTS_RSYNCIP=${RSYNCIP}
364 362
	export SNAPSHOTS_RSYNCUSER=${RSYNCUSER}
365
	export SNAPSHOTS_RSYNCLOGS=${RSYNCLOGS}
366 363
fi
367 364

  
368 365
if [ "${PRODUCT_NAME}" = "pfSense" ]; then

Also available in: Unified diff