Skip to content

Commit

Permalink
build: Move to go modules
Browse files Browse the repository at this point in the history
Drop usage of govendor as dependency management tool in favor to
go modules.

Closes moira-alert#423
  • Loading branch information
litleleprikon committed Oct 2, 2019
1 parent a616b04 commit c46ca63
Show file tree
Hide file tree
Showing 14 changed files with 477 additions and 1,697 deletions.
4 changes: 1 addition & 3 deletions Dockerfile.api
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.13.1 as builder

RUN go get github.com/kardianos/govendor

COPY ./vendor/vendor.json /go/src/github.com/moira-alert/moira/vendor/vendor.json
WORKDIR /go/src/github.com/moira-alert/moira
RUN govendor sync
RUN go get ./...

COPY . /go/src/github.com/moira-alert/moira/

Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.checker
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.13.1 as builder

RUN go get github.com/kardianos/govendor

COPY ./vendor/vendor.json /go/src/github.com/moira-alert/moira/vendor/vendor.json
WORKDIR /go/src/github.com/moira-alert/moira
RUN govendor sync
RUN go get ./...

COPY . /go/src/github.com/moira-alert/moira/

Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.filter
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.13.1 as builder

RUN go get github.com/kardianos/govendor

COPY ./vendor/vendor.json /go/src/github.com/moira-alert/moira/vendor/vendor.json
WORKDIR /go/src/github.com/moira-alert/moira
RUN govendor sync
RUN go get ./...

COPY . /go/src/github.com/moira-alert/moira/

Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.notifier
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM golang:1.13.1 as builder

RUN go get github.com/kardianos/govendor

COPY ./vendor/vendor.json /go/src/github.com/moira-alert/moira/vendor/vendor.json
WORKDIR /go/src/github.com/moira-alert/moira
RUN govendor sync
RUN go get ./...

COPY . /go/src/github.com/moira-alert/moira/

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ default: test build

.PHONY: prepare
prepare:
go get -u github.com/kardianos/govendor
govendor sync
go get ./...

.PHONY: lint
lint: prepare
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ Other installation methods are available, see [documentation](https://moira.read
To build and run tests, first get all dependencies:

```bash
go get github.com/kardianos/govendor
govendor sync
go get ./...
```

Then you need local redis listening on port 6379.
Expand Down
2 changes: 1 addition & 1 deletion database/redis/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/gomodule/redigo/redis"
"github.com/patrickmn/go-cache"
"gopkg.in/redsync.v1"
"github.com/go-redsync/redsync"
"gopkg.in/tomb.v2"

"github.com/moira-alert/moira"
Expand Down
2 changes: 1 addition & 1 deletion database/redis/locks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/moira-alert/moira"
"github.com/moira-alert/moira/database"
"gopkg.in/redsync.v1"
"github.com/go-redsync/redsync"
)

// NewLock returns the implementation of moira.Lock which can be used to Acquire or Release the lock
Expand Down
98 changes: 98 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
module github.com/moira-alert/moira

go 1.13

require (
bitbucket.org/tebeka/strftime v0.0.0-20140926081919-2194253a23c0 // indirect
github.com/FZambia/sentinel v1.0.1-0.20180630101255-52eb51343b45
github.com/JaderDias/movingmedian v0.0.0-20170611140316-de8c410559fa // indirect
github.com/Knetic/govaluate v3.0.1-0.20170815164058-89a078c30383+incompatible
github.com/PagerDuty/go-pagerduty v0.0.0-20190503230806-cf1437c7c8d6
github.com/RoaringBitmap/roaring v0.4.17-0.20180820165455-627b662e6d11 // indirect
github.com/aclements/go-moremath v0.0.0-20190830160640-d16893ddf098 // indirect
github.com/aws/aws-sdk-go v1.20.15-0.20190702192017-e1b61fed9fc0
github.com/beevee/go-chart v2.0.2-0.20190523110126-273a59e48bcc+incompatible
github.com/blend/go-sdk v2.0.0+incompatible // indirect
github.com/blevesearch/bleve v0.7.1-0.20180912193416-f9afd92d0dc4
github.com/blevesearch/blevex v0.0.0-20190916190636-152f0fe5c040 // indirect
github.com/blevesearch/go-porterstemmer v1.0.2 // indirect
github.com/blevesearch/segment v0.0.0-20160915185041-762005e7a34f // indirect
github.com/boltdb/bolt v1.3.2-0.20180302180052-fd01fc79c553 // indirect
github.com/bwmarrin/discordgo v0.19.1-0.20190513173526-8d8906ce4b95
github.com/carlosdp/twiliogo v0.0.0-20161027183705-b26045ebb9d1
github.com/couchbase/vellum v0.0.0-20180910213445-01d5c56e6095 // indirect
github.com/cyberdelia/go-metrics-graphite v0.0.0-20161219230853-39f87cc3b432
github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 // indirect
github.com/dgryski/go-onlinestats v0.0.0-20170612111826-1c7d19468768 // indirect
github.com/disintegration/imaging v1.4.2 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect
github.com/evmar/gocairo v0.0.0-20160222165215-ddd30f837497 // indirect
github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 // indirect
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd // indirect
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 // indirect
github.com/go-chi/chi v3.1.1-0.20170712121200-4c5a584b324b+incompatible
github.com/go-chi/render v1.0.0
github.com/go-graphite/carbonapi v0.0.0-20190604194342-5a4fa2112923
github.com/go-graphite/protocol v0.4.2
github.com/go-redsync/redsync v1.3.1
github.com/gofrs/uuid v3.2.0+incompatible
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/golang/mock v1.2.1-0.20190116182947-c20582278a82
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
github.com/gomodule/redigo v2.0.0+incompatible
github.com/google/go-querystring v1.0.1-0.20190318165438-c8c88dbee036 // indirect
github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e // indirect
github.com/gosexy/to v0.0.0-20141221203644-c20e083e3123
github.com/gotokatsuya/ipare v0.0.0-20161202043954-fd52c5b6c44b
github.com/gregdel/pushover v0.0.0-20190217183207-15d3fef40636
github.com/hashicorp/go-cleanhttp v0.5.2-0.20190406162018-d3fcbee8e181 // indirect
github.com/hashicorp/go-retryablehttp v0.5.4 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/karriereat/blackfriday-slack v0.1.0
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84 // indirect
github.com/lomik/og-rek v0.0.0-20170411191824-628eefeb8d80 // indirect
github.com/lomik/zapwriter v0.0.0-20180906104450-2ec2b9a61680 // indirect
github.com/lusis/go-slackbot v0.0.0-20180109053408-401027ccfef5 // indirect
github.com/lusis/slack-test v0.0.0-20190426140909-c40012f20018 // indirect
github.com/mjibson/go-dsp v0.0.0-20180508042940-11479a337f12 // indirect
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
github.com/nlopes/slack v0.4.1-0.20181123205743-38ac5e8c495b
github.com/onsi/ginkgo v1.10.1 // indirect
github.com/onsi/gomega v1.7.0 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/opsgenie/opsgenie-go-sdk-v2 v0.0.0-20190710132028-b46b0594268d
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/philhofer/fwd v1.0.0 // indirect
github.com/pkg/errors v0.8.1
github.com/rcrowley/go-metrics v0.0.0-20161128210544-1f30fe9094a5
github.com/rs/cors v0.0.0-20170801073201-eabcc6af4bbe
github.com/russross/blackfriday/v2 v2.0.1
github.com/sirupsen/logrus v1.3.0 // indirect
github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a
github.com/spf13/viper v1.4.0 // indirect
github.com/steveyen/gtreap v0.0.0-20150807155958-0abe01ef9be2 // indirect
github.com/syndtr/goleveldb v0.0.0-20180815032940-ae2bd5eed72d // indirect
github.com/tecbot/gorocksdb v0.0.0-20190930194452-65a88f08537a // indirect
github.com/tinylib/msgp v1.0.3-0.20180912221530-f65876d3ea05 // indirect
github.com/vova616/xxhash v0.0.0-20130313230233-f0a9a8b74d48
github.com/wangjohn/quickselect v0.0.0-20161129230411-ed8402a42d5f // indirect
github.com/willf/bitset v1.1.9 // indirect
github.com/writeas/go-strip-markdown v2.0.1+incompatible
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 // indirect
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24 // indirect
gonum.org/v1/netlib v0.0.0-20190926062253-2d6e29b73a19 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
gopkg.in/tucnak/telebot.v2 v2.0.0-20181115150921-4688194c178d
gopkg.in/yaml.v2 v2.2.3
)
Loading

0 comments on commit c46ca63

Please sign in to comment.