Skip to content

Commit f2a57c9

Browse files
authored
Merge pull request #18 from Microkubes/go-mod-support
Go mod support
2 parents a5ec309 + 7448453 commit f2a57c9

4 files changed

Lines changed: 208 additions & 23 deletions

File tree

.travis.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ sudo: required
33
env:
44
global:
55
- CC_TEST_REPORTER_ID=${CODE_CLIMATE_REPORTER_ID}
6+
- GO_ENABLED=0
7+
- GO111MODULE=on
8+
- GOOS=linux
9+
- GOARCH=amd64
610
- 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)
711
- CURRENT_BRANCH=$(if [ ! -z "$TRAVIS_TAG" ]; then echo $TRAVIS_TAG; else echo "master"; fi)
812

913
language: go
1014

1115
go:
12-
- 1.10.x
16+
- 1.13.x
1317

1418
before_install:
1519
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@@ -18,17 +22,6 @@ before_install:
1822
- sudo apt-get -y install docker-ce
1923
- go get -u github.com/axw/gocov/gocov
2024
- go get -u github.com/AlekSi/gocov-xml
21-
- go get -u gopkg.in/h2non/gock.v1
22-
- go get -u github.com/Microkubes/microservice-tools
23-
- go get -u github.com/Microkubes/microservice-security/...
24-
- go get -u github.com/keitaroinc/goa/...
25-
- go get -u github.com/keitaroinc/oauth2
26-
- go get -u gopkg.in/mgo.v2
27-
- go get -u github.com/afex/hystrix-go/hystrix
28-
- go get -u github.com/satori/go.uuid
29-
- go get -u github.com/dgrijalva/jwt-go
30-
- go get -u github.com/gorilla/sessions
31-
- go get -u github.com/gorilla/securecookie
3225

3326
before_script:
3427
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter

Dockerfile

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
### Multi-stage build
2-
FROM golang:1.10-alpine3.7 as build
2+
FROM golang:1.13.5-alpine3.10 as build
33

44
RUN apk --no-cache add git curl openssh
55

6-
RUN go get -u -v github.com/keitaroinc/goa/... && \
7-
go get -u -v github.com/asaskevich/govalidator && \
8-
go get -u -v github.com/keitaroinc/oauth2 && \
9-
go get -u -v github.com/gorilla/sessions && \
10-
go get -u -v github.com/gorilla/securecookie && \
11-
go get -u -v github.com/Microkubes/microservice-security/... && \
12-
go get -u -v github.com/Microkubes/microservice-tools/...
13-
146
COPY . /go/src/github.com/Microkubes/authorization-server
157

16-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install github.com/Microkubes/authorization-server
8+
RUN cd /go/src/github.com/Microkubes/authorization-server && \
9+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install
1710

1811
### Main
19-
FROM scratch
12+
FROM alpine:3.10
2013

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

go.mod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module github.com/Microkubes/authorization-server
2+
3+
go 1.13
4+
5+
require (
6+
github.com/Microkubes/microservice-security v1.1.0
7+
github.com/Microkubes/microservice-tools v1.1.0
8+
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
9+
github.com/gorilla/securecookie v1.1.1
10+
github.com/gorilla/sessions v1.2.0
11+
github.com/keitaroinc/goa v1.5.0
12+
github.com/keitaroinc/oauth2 v0.0.0-20190517234915-fc12472fd0bf
13+
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
14+
github.com/spf13/cobra v0.0.5
15+
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
16+
gopkg.in/h2non/gock.v1 v1.0.15
17+
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
18+
)

0 commit comments

Comments
 (0)