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

Unified Diff: archive_build.sh

Issue 6749018: Add in a gsutil_append_latest bool option to avoid appending ChromeOS-Hash-B# (Closed) Base URL: ssh://gitrw.chromium.org:9222/crosutils@master
Patch Set: fix a typo Created 9 years, 9 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 075444f42038746ac04e062bb0e52540474330ea..63224a6378729a6681f393802d58fb7ee63271b1 100755
--- a/archive_build.sh
+++ b/archive_build.sh
@@ -60,6 +60,8 @@ DEFINE_string acl "private" \
"ACL to set on GSD archives"
DEFINE_string gsutil_archive "" \
"Optional datastore archive location"
+DEFINE_boolean gsutil_append_last_change $FLAGS_TRUE \
+ "Optional Whether to append build # and chrome os hash to GS uploads"
DEFINE_integer keep_max 0 "Maximum builds to keep in archive (0=all)"
DEFINE_boolean official_build $FLAGS_FALSE \
"Set CHROMEOS_OFFICIAL=1 for release builds."
@@ -254,6 +256,10 @@ cp -f "${FLAGS_from}/au-generator.zip" "${OUTDIR}/"
function gsutil_archive() {
IN_PATH="$1"
OUT_PATH="$2"
+ if [ ${FLAGS_gsutil_append_last_change} -eq ${FLAGS_TRUE} ]; then
+ OUT_PATH="${LAST_CHANGE}/${OUT_PATH}"
+ fi
+
echo "Using gsutil to archive to ${OUT_PATH}..."
if [ -z "$FLAGS_gsutil_archive" -o ${FLAGS_debug} -eq ${FLAGS_TRUE} ]; then
echo -n "In debug mode. Would have run: "
@@ -280,7 +286,7 @@ then
"${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \
--output_tag "${HWQUAL_NAME}"
gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \
- "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2"
+ "${HWQUAL_NAME}.tar.bz2"
fi
@@ -304,7 +310,7 @@ if [ $FLAGS_prebuilt_upload -eq $FLAGS_TRUE ]; then
fi
fi
-gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}"
+gsutil_archive "${ZIPFILE}" "${FLAGS_zipname}"
if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ]; then
echo "Generating Breakpad symbols"
@@ -316,26 +322,30 @@ if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ]; then
CMD="chown \${SUDO_UID}:\${SUDO_GID} ${OUTDIR}/debug.tgz"
sudo sh -c "${CMD}"
popd
- gsutil_archive "${OUTDIR}/debug.tgz" "${LAST_CHANGE}/debug.tgz"
+ gsutil_archive "${OUTDIR}/debug.tgz" "debug.tgz"
fi
if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \
[ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ]; then
gsutil_archive "${FACTORY_ZIPFILE}" \
- "${LAST_CHANGE}/factory_${FLAGS_zipname}"
+ "factory_${FLAGS_zipname}"
fi
gsutil_archive "${FLAGS_to}/LATEST" "LATEST"
if [ -n "${FLAGS_gsutil_archive}" ]; then
- FULL_INDEX_PATH="${FLAGS_gsutil_archive}/${LAST_CHANGE}/_index.html"
+ if [ ${FLAGS_gsutil_append_last_change} -eq ${FLAGS_TRUE} ]; then
+ FULL_INDEX_PATH="${FLAGS_gsutil_archive}/${LAST_CHANGE}/_index.html"
+ else
+ FULL_INDEX_PATH="${FLAGS_gsutil_archive}/_index.html"
+ fi
RELATIVE_ARCHIVE_URL_PATH="${FULL_INDEX_PATH#gs://}"
echo "CROS_ARCHIVE_URL=\
https://sandbox.google.com/storage/${RELATIVE_ARCHIVE_URL_PATH}"
fi
if [ -n "${FLAGS_test_tarball}" ]; then
- gsutil_archive "${FLAGS_test_tarball}" "${LAST_CHANGE}/test_results.tgz"
+ gsutil_archive "${FLAGS_test_tarball}" "test_results.tgz"
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