cos-dkms: Check that source tree dir is non-empty

If there is no dkms.conf file, we can still do reasonable things with
other source files. If there are no source files, we can still do
reasonable things with dkms.conf (like downloading pre-built modules from
the cache build directory). However, if both are missing, there is nothing
we can reasonably do, so we should error out.

This is a common error case if, for instance, a GCS bucket name is
entered incorrectly. "Succeeding" silently here is surprising and hard to
debug.

Change-Id: I5f65823085d16fba9d6c2e1cc02a4d20fcc6f770
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/105839
Reviewed-by: Shuo Yang <gshuoy@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: Kevin Berry <kpberry@google.com>
2 files changed
tree: a3008c625d4434bf28b6229df1fbcc088abbee87
  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. postsubmit-cloudbuild.yaml
  14. README.md
  15. run_builds.sh
  16. run_unit_tests.sh
  17. 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.