Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: archive_build.sh

Issue 2834016: Adding option to archive to google storage for developers. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: fixing typos Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: archive_build.sh
diff --git a/archive_build.sh b/archive_build.sh
index 5900f72f6df6d2b4fd200e5889d100d193dca4b8..099055089b27eaa05d653e9c453de7514ff99fc3 100755
--- a/archive_build.sh
+++ b/archive_build.sh
@@ -37,6 +37,10 @@ DEFINE_boolean factory_test_mod $FLAGS_FALSE \
"Modify image for factory testing purposes"
DEFINE_boolean factory_install_mod $FLAGS_FALSE \
"Modify image for factory install purposes"
+DEFINE_string gsutil "gsutil" \
+ "Location of gsutil"
+DEFINE_string gsutil_archive "" \
+ "Optional datastore archive location"
# Parse command line
FLAGS "$@" || exit 1
@@ -182,6 +186,36 @@ then
HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}"
"${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \
--output_tag "${HWQUAL_NAME}"
+ # Optionally archive with gsutil hwqual.
+ if [ $FLAGS_gsutil_archive != "" ]
+ then
+ GS_OUTDIR="${FLAGS_gsutil_archive}/${LAST_CHANGE}"
+ GS_HWQUAL_IN="${OUTDIR}/${HWQUAL_NAME}.tar.bz2"
+ GS_HWQUAL_OUT="${GS_OUTDIR}/${HWQUAL_NAME}.tar.bz2"
+ echo "Using gsutil to archive to ${GS_HWQUAL_OUT}..."
+ ${FLAGS_gsutil} cp ${GS_HWQUAL_IN} ${GS_HWQUAL_OUT}
+ fi
+fi
+
+# Optionally archive to Google Storage for Developers.
+if [ $FLAGS_gsutil_archive != "" ]
+then
+ GS_OUTDIR="${FLAGS_gsutil_archive}/${LAST_CHANGE}"
+ GS_ZIPFILE="${GS_OUTDIR}/${FLAGS_zipname}"
+ GS_FACTORY_ZIPFILE="${GS_OUTDIR}/factory_${FLAGS_zipname}"
+ GS_LATEST="${FLAGS_gsutil_archive}/LATEST"
+ echo "Using gsutil to archive to ${GS_ZIPFILE}..."
+ ${FLAGS_gsutil} cp ${ZIPFILE} ${GS_ZIPFILE}
+
+ if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \
+ [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ]
+ then
+ echo "Using gsutil to archive to ${GS_FACTORY_ZIPFILE}..."
+ ${FLAGS_gsutil} cp ${FACTORY_ZIPFILE} ${GS_FACTORY_ZIPFILE}
+ fi
+
+ echo "Updating latest ${GS_LATEST}..."
+ ${FLAGS_gsutil} cp ${FLAGS_to}/LATEST ${GS_LATEST}
fi
# Purge old builds if necessary
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698