Skip to content

Commit

Permalink
Switch to go-modules
Browse files Browse the repository at this point in the history
This removes the old vendoring for go module support. We also add an
additional verification step to travis.

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Jul 31, 2019
1 parent fce109e commit 834e3d0
Show file tree
Hide file tree
Showing 1,177 changed files with 192,690 additions and 55,342 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
script:
- make lint
- make gofmt
- make vendor && hack/tree_status.sh
- stage: Build
os: linux # Only need to run on Linux
script:
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ Follow either of the two links above to access the appropriate CLA and instructi

### Adding dependencies

If your patch depends on new packages, add that package using the provided [hack/update-vendor.sh](hack/update-vendor.sh) script, which is a wrapper around [vndr](https://github.com/LK4D4/vndr).

To restore package versions with `godep`, refer to the Kubernetes Community docs for [restoring dependencies](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/godep.md#restoring-deps).
If your patch depends on new packages, add that package to the `go.mod` file,
run `make vendor` and commit the changes.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

export GO111MODULE=off

GO ?= go
PROJECT := github.com/kubernetes-sigs/cri-tools
BINDIR := /usr/local/bin
Expand Down Expand Up @@ -103,6 +105,12 @@ install.tools:
release:
hack/release.sh

vendor:
export GO111MODULE=on \
$(GO) mod tidy && \
$(GO) mod vendor && \
$(GO) mod verify

.PHONY: \
help \
check-gopath \
Expand All @@ -119,4 +127,5 @@ release:
lint \
gofmt \
install.tools \
release
release \
vendor
53 changes: 53 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module github.com/kubernetes-sigs/cri-tools

go 1.12

require (
github.com/docker/distribution v0.0.0-20190711223531-1fb7fffdb266
github.com/docker/docker v0.7.3-0.20190731001754-589f1dad8dad
github.com/docker/go-units v0.4.0
github.com/ghodss/yaml v1.0.0
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/protobuf v1.3.2
github.com/onsi/ginkgo v1.8.0
github.com/onsi/gomega v1.5.0
github.com/opencontainers/go-digest v1.0.0-rc1
github.com/opencontainers/selinux v1.2.2
github.com/pborman/uuid v1.2.0
github.com/sirupsen/logrus v1.4.2
github.com/urfave/cli v0.0.0-20180821064027-934abfb2f102
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80
golang.org/x/sys v0.0.0-20190730183949-1393eb018365
google.golang.org/grpc v1.22.1
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0
k8s.io/apimachinery v0.0.0
k8s.io/client-go v11.0.0+incompatible
k8s.io/cri-api v0.0.0
k8s.io/kubernetes v0.0.0
)

replace (
k8s.io/api => k8s.io/kubernetes/staging/src/k8s.io/api v0.0.0-20190710032638-4485c6f18cee
k8s.io/apiextensions-apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20190710032638-4485c6f18cee
k8s.io/apimachinery => k8s.io/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20190710032638-4485c6f18cee
k8s.io/apiserver => k8s.io/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20190710032638-4485c6f18cee
k8s.io/cli-runtime => k8s.io/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20190710032638-4485c6f18cee
k8s.io/client-go => k8s.io/kubernetes/staging/src/k8s.io/client-go v0.0.0-20190710032638-4485c6f18cee
k8s.io/cloud-provider => k8s.io/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20190710032638-4485c6f18cee
k8s.io/cluster-bootstrap => k8s.io/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20190710032638-4485c6f18cee
k8s.io/code-generator => k8s.io/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20190710032638-4485c6f18cee
k8s.io/component-base => k8s.io/kubernetes/staging/src/k8s.io/component-base v0.0.0-20190710032638-4485c6f18cee
k8s.io/cri-api => k8s.io/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20190710032638-4485c6f18cee
k8s.io/csi-translation-lib => k8s.io/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20190710032638-4485c6f18cee
k8s.io/kube-aggregator => k8s.io/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20190710032638-4485c6f18cee
k8s.io/kube-controller-manager => k8s.io/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20190710032638-4485c6f18cee
k8s.io/kube-proxy => k8s.io/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20190710032638-4485c6f18cee
k8s.io/kube-scheduler => k8s.io/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20190710032638-4485c6f18cee
k8s.io/kubectl => k8s.io/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20190710032638-4485c6f18cee
k8s.io/kubelet => k8s.io/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20190710032638-4485c6f18cee
k8s.io/kubernetes => k8s.io/kubernetes v1.15.1
k8s.io/legacy-cloud-providers => k8s.io/kubernetes/staging/src/k8s.io/legacy-cloud-providers v0.0.0-20190710032638-4485c6f18cee
k8s.io/metrics => k8s.io/kubernetes/staging/src/k8s.io/metrics v0.0.0-20190710032638-4485c6f18cee
k8s.io/sample-apiserver => k8s.io/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20190710032638-4485c6f18cee
)
Loading

0 comments on commit 834e3d0

Please sign in to comment.