Skip to content

Commit

Permalink
Merge pull request #8 from Microkubes/go-mod-support
Browse files Browse the repository at this point in the history
added go mod support
  • Loading branch information
blazhovsky authored Dec 25, 2019
2 parents 9974d0a + 0ecddab commit b77228f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ sudo: required
env:
global:
- CC_TEST_REPORTER_ID=${CODE_CLIMATE_REPORTER_ID}
- GO_ENABLED=0
- GO111MODULE=on
- GOOS=linux
- GOARCH=amd64
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
- CURRENT_BRANCH=$(if [ ! -z "$TRAVIS_TAG" ]; then echo $TRAVIS_TAG; else echo "master"; fi)

language: go

go:
- 1.10.x
- 1.13.x

before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Expand All @@ -18,9 +22,6 @@ before_install:
- sudo apt-get -y install docker-ce
- go get github.com/axw/gocov/gocov
- go get github.com/AlekSi/gocov-xml
- go get github.com/keitaroinc/goa/...
- go get github.com/Microkubes/microservice-tools/...
- go get gopkg.in/gomail.v2

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
### Multi-stage build
FROM golang:1.10-alpine3.7 as build
FROM golang:1.13.5-alpine3.10 as build

RUN apk --no-cache add git

RUN go get -u -v gopkg.in/gomail.v2 && \
go get -u -v github.com/Microkubes/microservice-tools/...

COPY . /go/src/github.com/Microkubes/microservice-mail

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install github.com/Microkubes/microservice-mail
RUN cd /go/src/github.com/Microkubes/microservice-mail && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install


### Main
FROM scratch
FROM alpine:3.10

ENV API_GATEWAY_URL="http://localhost:8001"

Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/Microkubes/microservice-mail

go 1.13

require (
github.com/Microkubes/microservice-tools v1.1.0
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/Microkubes/microservice-tools v1.1.0 h1:0kyByC+JqVi/nDDp+eKYhDpgqdA1xvVP68wGIpcJDcQ=
github.com/Microkubes/microservice-tools v1.1.0/go.mod h1:9YPuF99237LdC2025udqFF82dzLl0jPvZEnXIAGJXBQ=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/keitaroinc/goa v1.5.0/go.mod h1:/2wU1ZNwnOGEs2McuC3BMK59BD0nTRmZ2Uy61h/uuZY=
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271 h1:WhxRHzgeVGETMlmVfqhRn8RIeeNoPr2Czh33I4Zdccw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE=
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=

0 comments on commit b77228f

Please sign in to comment.