cos-customizer: add service account to preload VM

For security reason, some cos-customizer user has
GCE default service account disabled. So they will
need to use a different service account for the preload
VM to download artifacts from GCS. This CL adds a
flag `-service-account` to command `finish-image-build`
to allow users to use a non-default service account.

BUG=b/284209005
TEST=run the locally built container with/without the flag
and a different service account.
RELEASE_NOTE=None

Change-Id: I53440d1e2ddd072cf1c206a10df6883ba4b74a93
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/50610
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Tested-by: He Gao <hegao@google.com>
5 files changed
tree: 7236b7eee518c0c124f98b7a622a0d652a84123a
  1. coverage/
  2. release/
  3. src/
  4. testing/
  5. .gitignore
  6. BUILD.bazel
  7. cloudbuild.yaml
  8. CONTRIBUTING.md
  9. deps.bzl
  10. go.mod
  11. go.sum
  12. LICENSE
  13. README.md
  14. run_tests.sh
  15. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.