Merge pull request #7541 from mikesplain/update_bazel_gomod

Add a few docs comments on gomod and bazel
This commit is contained in:
Kubernetes Prow Robot 2019-09-09 14:10:55 -07:00 committed by GitHub
commit 6a732b8cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -10,6 +10,9 @@ While bazel works well for small projects, building with kubernetes still has a
* We vendor our dependencies, rather than relying on gazelle (although actually gazelle works, the issue is when external dependencies like apimachinery include bazel files that confuse gazelle)
* We strip bazel files from external dependencies, so we don't confuse gazelle
## Bazel versions:
For building kops release branches 1.14 and older, you may need to run an older version of bazel such as `0.24.0`. kops 1.15 and newer should be able to use more recent versions of bazel due to deprecation fixes that have not be backported.
## How to run
```

View File

@ -1,7 +1,9 @@
# Vendoring Go dependencies
kops uses [dep](https://github.com/golang/dep) to manage vendored
dependencies.
dependencies in most versions leading up to kops 1.14.
kops uses [go mod](https://github.com/golang/go/wiki/Modules) to manage
vendored dependencies in versions 1.15 and newer.
## Prerequisites
@ -9,9 +11,12 @@ The following software must be installed prior to running the
update commands:
* [bazel](https://github.com/bazelbuild/bazel)
* [dep](https://github.com/golang/dep)
* [dep](https://github.com/golang/dep) for kops 1.14 or older
* [go mod](https://github.com/golang/go/wiki/Modules) for kops 1.15 and newer branches (including master)
* [hg](https://www.mercurial-scm.org/wiki/Download)
<!-- TODO: update dependency management for go mod -->
## Adding a dependency to the vendor directory
The `dep` tool will manage required dependencies based on the imports