Fix FindBuild functionality for annotated git tags.

Recently, COS started using annotated tags for associating a git tag
with a manifest-snapshot commit. Due to this, the FindBuild
functionality broke as annotated tags creates a new git object and
gitiles package didn't provide any API for mapping the git object with
the commitSHA associated with manifest-snapshot.

Now, gerrit package is being used as it provides all the information
such as Object and Revision from which the commitSHA associated with
a commit in manifest-snapshot can be mapped to the git tag i.e.
buildnumber.

Also, handle the cases where the changelist/commitSHA is on main branch.

BUG=b/180129577
TEST=https://paste.googleplex.com/5381390490140672

Change-Id: I30c63a890f5e3092d2c7c6b2a16ebc1ed3d141a9
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/12431
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
9 files changed
tree: f3413dda0780773189fc84124cfb6d445176f9dd
  1. src/
  2. CONTRIBUTING.md
  3. go.mod
  4. go.sum
  5. LICENSE
  6. README.md
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.