Skip to content

Commit c348b80

Browse files
committed
Move automation from dep to go modules
1 parent d8c4dcb commit c348b80

File tree

10 files changed

+505
-1393
lines changed

10 files changed

+505
-1393
lines changed

Gopkg.lock

Lines changed: 0 additions & 1292 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 97 deletions
This file was deleted.

Makefile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ VERSION ?= $(shell git describe --always --abbrev=7)
44
MUTABLE_TAG ?= latest
55
IMAGE = $(REGISTRY)machine-api-operator
66

7+
# Enable go modules and vendoring
8+
# https://github.com/golang/go/wiki/Modules#how-to-install-and-activate-module-support
9+
# https://github.com/golang/go/wiki/Modules#how-do-i-use-vendoring-with-modules-is-vendoring-going-away
10+
GO111MODULE = on
11+
export GO111MODULE
12+
GOFLAGS ?= -mod=vendor
13+
export GOFLAGS
14+
715
ifeq ($(DBG),1)
816
GOGCFLAGS ?= -gcflags=all="-N -l"
917
endif
@@ -16,10 +24,16 @@ ifeq ($(NO_DOCKER), 1)
1624
DOCKER_CMD =
1725
IMAGE_BUILD_CMD = imagebuilder
1826
else
19-
DOCKER_CMD := docker run --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator golang:1.12
27+
DOCKER_CMD := docker run --env GO111MODULE=$(GO111MODULE) --env GOFLAGS=$(GOFLAGS) --rm -v "$(PWD)":/go/src/github.com/openshift/machine-api-operator:Z -w /go/src/github.com/openshift/machine-api-operator golang:1.12
2028
IMAGE_BUILD_CMD = docker build
2129
endif
2230

31+
.PHONY: vendor
32+
vendor:
33+
go mod tidy
34+
go mod vendor
35+
go mod verify
36+
2337
.PHONY: check
2438
check: lint fmt vet verify-codegen check-pkg test ## Run code validations
2539

@@ -85,7 +99,7 @@ deploy-kubemark:
8599
.PHONY: test
86100
test: ## Run tests
87101
@echo -e "\033[32mTesting...\033[0m"
88-
$(DOCKER_CMD) go test ./...
102+
$(DOCKER_CMD) go test ./pkg/... ./cmd/...
89103

90104
.PHONY: image
91105
image: ## Build docker image

go.mod

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
module github.com/openshift/machine-api-operator
2+
3+
go 1.12
4+
5+
require (
6+
cloud.google.com/go v0.36.0 // indirect
7+
github.com/blang/semver v3.5.1+incompatible
8+
github.com/ghodss/yaml v1.0.0
9+
github.com/gobuffalo/envy v1.6.15 // indirect
10+
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
11+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
12+
github.com/markbates/inflect v1.0.4 // indirect
13+
github.com/onsi/ginkgo v1.8.0
14+
github.com/onsi/gomega v1.5.0
15+
github.com/openshift/api v3.9.1-0.20190517100836-d5b34b957e91+incompatible
16+
github.com/openshift/client-go v0.0.0-20190617165122-8892c0adc000
17+
github.com/openshift/cluster-api v0.0.0-20190805113604-f8de78af80fc
18+
github.com/openshift/cluster-api-actuator-pkg v0.0.0-20190904193718-8250b456dec7
19+
github.com/openshift/cluster-autoscaler-operator v0.0.1-0.20190521201101-62768a6ba480
20+
github.com/openshift/cluster-version-operator v3.11.1-0.20190629164025-08cac1c02538+incompatible
21+
github.com/operator-framework/operator-sdk v0.5.1-0.20190301204940-c2efe6f74e7b
22+
github.com/prometheus/client_golang v1.0.0
23+
github.com/rogpeppe/go-internal v1.3.0 // indirect
24+
github.com/spf13/cobra v0.0.3
25+
github.com/stretchr/testify v1.3.0
26+
gonum.org/v1/gonum v0.0.0-20190915125329-975d99cd20a9 // indirect
27+
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
28+
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
29+
k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
30+
k8s.io/code-generator v0.0.0-00010101000000-000000000000
31+
k8s.io/klog v0.4.0
32+
k8s.io/utils v0.0.0-20190607212802-c55fbcfc754a
33+
sigs.k8s.io/controller-runtime v0.2.0-beta.2
34+
sigs.k8s.io/controller-tools v0.1.10
35+
)
36+
37+
replace gopkg.in/fsnotify.v1 v1.4.7 => github.com/fsnotify/fsnotify v1.4.7
38+
39+
replace k8s.io/apiextensions-apiserver v0.0.0-20190315093550-53c4693659ed => github.com/openshift/kubernetes-apiextensions-apiserver v0.0.0-20190315093550-53c4693659ed
40+
41+
replace k8s.io/apimachinery v0.0.0-20190313205120-d7deff9243b1 => github.com/openshift/kubernetes-apimachinery v0.0.0-20190313205120-d7deff9243b1
42+
43+
replace k8s.io/client-go v11.0.0+incompatible => github.com/openshift/kubernetes-client-go v11.0.0+incompatible
44+
45+
replace k8s.io/kube-aggregator v0.0.0-20190314000639-da8327669ac5 => github.com/openshift/kubernetes-kube-aggregator v0.0.0-20190314000639-da8327669ac5
46+
47+
replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2
48+
49+
replace k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190311093542-50b561225d70

0 commit comments

Comments
 (0)