Skip to content

Commit

Permalink
Merge pull request #18 from Microkubes/go-mod-support
Browse files Browse the repository at this point in the history
Go mod support
  • Loading branch information
blazhovsky authored Dec 25, 2019
2 parents a5ec309 + 7448453 commit f2a57c9
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 23 deletions.
17 changes: 5 additions & 12 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,17 +22,6 @@ before_install:
- sudo apt-get -y install docker-ce
- go get -u github.com/axw/gocov/gocov
- go get -u github.com/AlekSi/gocov-xml
- go get -u gopkg.in/h2non/gock.v1
- go get -u github.com/Microkubes/microservice-tools
- go get -u github.com/Microkubes/microservice-security/...
- go get -u github.com/keitaroinc/goa/...
- go get -u github.com/keitaroinc/oauth2
- go get -u gopkg.in/mgo.v2
- go get -u github.com/afex/hystrix-go/hystrix
- go get -u github.com/satori/go.uuid
- go get -u github.com/dgrijalva/jwt-go
- go get -u github.com/gorilla/sessions
- go get -u github.com/gorilla/securecookie

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down
15 changes: 4 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
### 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 curl openssh

RUN go get -u -v github.com/keitaroinc/goa/... && \
go get -u -v github.com/asaskevich/govalidator && \
go get -u -v github.com/keitaroinc/oauth2 && \
go get -u -v github.com/gorilla/sessions && \
go get -u -v github.com/gorilla/securecookie && \
go get -u -v github.com/Microkubes/microservice-security/... && \
go get -u -v github.com/Microkubes/microservice-tools/...

COPY . /go/src/github.com/Microkubes/authorization-server

RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install github.com/Microkubes/authorization-server
RUN cd /go/src/github.com/Microkubes/authorization-server && \
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
18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/Microkubes/authorization-server

go 1.13

require (
github.com/Microkubes/microservice-security v1.1.0
github.com/Microkubes/microservice-tools v1.1.0
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/gorilla/securecookie v1.1.1
github.com/gorilla/sessions v1.2.0
github.com/keitaroinc/goa v1.5.0
github.com/keitaroinc/oauth2 v0.0.0-20190517234915-fc12472fd0bf
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/spf13/cobra v0.0.5
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
gopkg.in/h2non/gock.v1 v1.0.15
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
)
Loading

0 comments on commit f2a57c9

Please sign in to comment.