Update enter_chroot to handle logs cert file.
Once this change is in, I can do an led run in the infra/recipes
directory that sets appropriate env vars to use this file. If
the led run works, then I can proceed with config-changes to
enable logging for staging runs.
BUG=chromium:1128411
TEST=manual test
Change-Id: Ib16250f930856ade192b2288751ef314b5c7e079
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2633955
Tested-by: Michael Mortensen <mmortensen@google.com>
Reviewed-by: Mike Nichols <mikenichols@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh
index 1f7b8b3..cc82688 100755
--- a/sdk_lib/enter_chroot.sh
+++ b/sdk_lib/enter_chroot.sh
@@ -623,6 +623,14 @@
for fn in "${FILES_TO_COPY_TO_CHROOT[@]}"; do
copy_into_chroot_if_exists "${SUDO_HOME}/${fn}" "/home/${SUDO_USER}/${fn}"
done
+
+ # Map in credentials account for log-writing access.
+ log_cert_dir="/creds/service_accounts/"
+ log_cert_file="service-account-chromeos-datastore-writer-prod.json"
+ copy_into_chroot_if_exists "${log_cert_dir}${log_cert_file}" \
+ "/home/${SUDO_USER}/${log_cert_file}"
+
+
setup_git
promote_api_keys