Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Nov 2016 01:19:49 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r308159 - user/gjb/thermite
Message-ID:  <201611010119.uA11Jnra077381@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Tue Nov  1 01:19:48 2016
New Revision: 308159
URL: https://svnweb.freebsd.org/changeset/base/308159

Log:
  Re-sync with the RE repo:
  
  Send a final 'all done' email when everything is done, instead of
  waiting for EC2/Vagrant/GCE/etc which may be still in progress.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  user/gjb/thermite/thermite.sh

Modified: user/gjb/thermite/thermite.sh
==============================================================================
--- user/gjb/thermite/thermite.sh	Mon Oct 31 23:40:04 2016	(r308158)
+++ user/gjb/thermite/thermite.sh	Tue Nov  1 01:19:48 2016	(r308159)
@@ -244,6 +244,20 @@ send_logmail() {
 	return 0
 }
 
+# Email completed output
+send_completed_email() {
+	[ -z "${emailgoesto}" ] && return 0
+	[ -z "${emailsentfrom}" ] && return 0
+	local _body
+	local _subject
+	_subject="Snapshot builds completed"
+	_body="Weeee!"
+
+	printf "From: ${emailsentfrom}\nTo: ${emailgoesto}\nSubject: ${_subject}\n\n${_body}\n\n" \
+		| /usr/sbin/sendmail -oi -f ${emailsentfrom} ${emailgoesto}
+	return 0
+}
+
 # Stage builds for ftp propagation.
 ftp_stage() {
 	_build="${rev}-${arch}-${kernel}-${type}"
@@ -514,6 +528,7 @@ main() {
 	runall upload_ec2_ami
 	runall upload_gce_image
 	runall upload_vagrant_image
+	send_completed_email
 }
 
 main "$@"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611010119.uA11Jnra077381>