Project

General

Profile

« Previous | Next » 

Revision 2e6f6523

Added by Brad Davis over 3 years ago

Save the distfiles to s3 with the git branch as part of the name

This will help us clean out old distfiles we do not need while providing
the ability to keep old distfiles around if we need to build a point
release for an older branch.

View differences:

tools/builder_common.sh
1751 1751
	fi
1752 1752

  
1753 1753
	if [ "${AWS}" = 1 ] && \
1754
	    aws_exec s3 ls s3://pfsense-engineering-build-pkg/${FLAVOR}-distfiles.tar >/dev/null 2>&1; then
1754
	    aws_exec s3 ls s3://pfsense-engineering-build-pkg/${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar >/dev/null 2>&1; then
1755 1755
		# Download a copy of the distfiles from S3
1756 1756
		echo ">>> Downloading distfile cache from S3.." | tee -a ${LOGFILE}
1757
		aws_exec s3 cp s3://pfsense-engineering-build-pkg/${FLAVOR}-distfiles.tar . --no-progress
1758
		script -aq ${LOGFILE} tar -xf ${FLAVOR}-distfiles.tar -C /usr/ports/distfiles
1757
		aws_exec s3 cp s3://pfsense-engineering-build-pkg/${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar . --no-progress
1758
		script -aq ${LOGFILE} tar -xf ${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar -C /usr/ports/distfiles
1759 1759
		# Save a list of distfiles
1760 1760
		find /usr/ports/distfiles > pre-build-distfile-list
1761 1761

  
......
2097 2097
		find /usr/ports/distfiles > post-build-distfile-list
2098 2098
		diff pre-build-distfile-list post-build-distfile-list > /dev/null
2099 2099
		if [ $? -eq 1 ]; then
2100
			rm ${FLAVOR}-distfiles.tar
2101
			script -aq ${LOGFILE} tar -cf ${FLAVOR}-distfiles.tar -C /usr/ports/distfiles .
2102
			aws_exec s3 cp ${FLAVOR}-distfiles.tar s3://pfsense-engineering-build-pkg/ --no-progress
2100
			rm ${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar
2101
			script -aq ${LOGFILE} tar -cf ${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar -C /usr/ports/distfiles .
2102
			aws_exec s3 cp ${FLAVOR}-${POUDRIERE_PORTS_GIT_BRANCH}-distfiles.tar s3://pfsense-engineering-build-pkg/ --no-progress
2103 2103
		fi
2104 2104
	fi
2105 2105
}

Also available in: Unified diff