Skip to content

Commit

Permalink
Merge pull request #178 from paulfantom/go_mod
Browse files Browse the repository at this point in the history
*: use go 1.12 and migrate to go modules
  • Loading branch information
openshift-merge-robot committed Jun 4, 2019
2 parents 0ea90bb + fcc73b6 commit f3fb4ee
Show file tree
Hide file tree
Showing 607 changed files with 11,804 additions and 104,695 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
@@ -1,4 +1,4 @@
FROM openshift/origin-release:golang-1.10
FROM openshift/origin-release:golang-1.12
COPY . /go/src/github.com/openshift/telemeter
RUN cd /go/src/github.com/openshift/telemeter && \
go build ./cmd/telemeter-client && \
Expand All @@ -8,4 +8,4 @@ RUN cd /go/src/github.com/openshift/telemeter && \
FROM centos:7
COPY --from=0 /go/src/github.com/openshift/telemeter/telemeter-client /usr/bin/
COPY --from=0 /go/src/github.com/openshift/telemeter/telemeter-server /usr/bin/
COPY --from=0 /go/src/github.com/openshift/telemeter/authorization-server /usr/bin/
COPY --from=0 /go/src/github.com/openshift/telemeter/authorization-server /usr/bin/
8 changes: 5 additions & 3 deletions Makefile
Expand Up @@ -20,12 +20,12 @@ JSONNET_VENDOR=jsonnet/jsonnetfile.lock.json jsonnet/vendor
DOCS=$(shell grep -rlF [embedmd] docs)

GO_BUILD_RECIPE=GOOS=linux CGO_ENABLED=0 go build
# TODO(paulfantom): add '-e GO111MODULE=on' when moving to go 1.12
CONTAINER_CMD:=docker run --rm \
-u="$(shell id -u):$(shell id -g)" \
-v "$(shell go env GOCACHE):/.cache/go-build" \
-v "$(PWD):/go/src/$(GO_PKG):Z" \
-w "/go/src/$(GO_PKG)" \
-e GO111MODULE=on \
quay.io/coreos/jsonnet-ci


Expand Down Expand Up @@ -67,7 +67,9 @@ image: .hack-operator-image
##############

vendor:
glide update -v --skip-test
go mod vendor
go mod tidy
go mod verify

.PHONY: generate
generate: $(DOCS) manifests
Expand Down Expand Up @@ -181,6 +183,6 @@ $(GOJSONTOYAML_BIN):
go get -u github.com/brancz/gojsontoyaml

$(GOLANGCI_LINT_BIN):
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(FIRST_GOPATH)/bin v1.10.2
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(FIRST_GOPATH)/bin v1.16.0


8 changes: 3 additions & 5 deletions cmd/telemeter-benchmark/main.go
Expand Up @@ -102,11 +102,9 @@ func runCmd() error {
u.Path = path.Join(to.Path, "authorize")
toAuthorize = &u
}
if toUpload == nil {
u := *to
u.Path = path.Join(to.Path, "upload")
toUpload = &u
}
u := *to
u.Path = path.Join(to.Path, "upload")
toUpload = &u
}

if toUpload == nil || toAuthorize == nil {
Expand Down
8 changes: 3 additions & 5 deletions cmd/telemeter-client/main.go
Expand Up @@ -175,11 +175,9 @@ func (o *Options) Run() error {
}
toAuthorize = &u
}
if toUpload == nil {
u := *to
u.Path = path.Join(to.Path, "upload")
toUpload = &u
}
u := *to
u.Path = path.Join(to.Path, "upload")
toUpload = &u
}

if toUpload == nil || toAuthorize == nil {
Expand Down
172 changes: 0 additions & 172 deletions glide.lock

This file was deleted.

30 changes: 0 additions & 30 deletions glide.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions go.mod
@@ -0,0 +1,26 @@
module github.com/openshift/telemeter

go 1.12

require (
github.com/coreos/go-oidc v2.0.0+incompatible
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/golang/protobuf v1.2.0
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
github.com/hashicorp/go-msgpack v0.5.3
github.com/hashicorp/memberlist v0.1.4
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/oklog/run v0.0.0-20180308005104-6934b124db28
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
github.com/prometheus/client_golang v0.9.1
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910
github.com/prometheus/common v0.2.0
github.com/prometheus/prometheus v2.7.1+incompatible
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
github.com/spf13/cobra v0.0.3
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/sys v0.0.0-20190124100055-b90733256f2e // indirect
golang.org/x/time v0.0.0-20170424234030-8be79e1e0910
gopkg.in/square/go-jose.v2 v2.0.0-20180411045311-89060dee6a84
)

0 comments on commit f3fb4ee

Please sign in to comment.