From 1912483e4e13d6a6f1a7f5a74e51fc3e51d64fb8 Mon Sep 17 00:00:00 2001 From: Vladimir Tomanovski Date: Sun, 5 Nov 2017 17:00:24 +0100 Subject: [PATCH] Use go dep instead of go get ... --- .gitignore | 5 +- .travis.yml | 15 ++---- Dockerfile | 9 +++- Gopkg.lock | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Gopkg.toml | 70 +++++++++++++++++++++++++ 5 files changed, 232 insertions(+), 14 deletions(-) create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml diff --git a/.gitignore b/.gitignore index d9fdec3..3239d2b 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,7 @@ keys ssh-keys saml-keys .keys -.ssh-keys \ No newline at end of file +.ssh-keys + +# Go Dependency Management +vendor \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 9ad1d3a..c0d3544 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,22 +12,13 @@ before_install: - git config --global url."git@github.com:".insteadOf "https://github.com/" - 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/JormungandrK/microservice-tools - - go get -u github.com/JormungandrK/microservice-security/... - - go get -u github.com/goadesign/goa/... - - go get -u github.com/goadesign/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 + - go get -u -v github.com/golang/dep/cmd/dep + - dep ensure -v before_script: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter script: - - gocov test github.com/JormungandrK/authorization-server/... | gocov-xml > coverage.xml && ./cc-test-reporter format-coverage -t cobertura -o coverage.json coverage.xml + - gocov test $(go list ./... | grep -v vendor) | gocov-xml > coverage.xml && ./cc-test-reporter format-coverage -t cobertura -o coverage.json coverage.xml - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter upload-coverage -i coverage.json; fi diff --git a/Dockerfile b/Dockerfile index ca0655a..dafc772 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ ### Multi-stage build -FROM jormungandrk/goa-build as build +FROM golang:1.8.3-alpine3.6 as build + +RUN apk add --no-cache git COPY . /go/src/github.com/JormungandrK/authorization-server + +WORKDIR /go/src/github.com/JormungandrK/authorization-server + +RUN go get -u -v github.com/golang/dep/cmd/dep +RUN dep ensure -v RUN go install github.com/JormungandrK/authorization-server ### Main diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..0c6e115 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,147 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/JormungandrK/microservice-security" + packages = ["auth","chain","jwt","oauth2","tools"] + revision = "f8001122d4891c84abf8cadd780c071d2a409b3b" + +[[projects]] + branch = "master" + name = "github.com/JormungandrK/microservice-tools" + packages = ["gateway"] + revision = "de2be3865cac4263bf5fc1f19000ae23a49feba2" + +[[projects]] + branch = "master" + name = "github.com/afex/hystrix-go" + packages = ["hystrix","hystrix/metric_collector","hystrix/rolling"] + revision = "f118cd938f786d24f46cc307981d8f63b7951020" + +[[projects]] + branch = "master" + name = "github.com/armon/go-metrics" + packages = ["."] + revision = "9a4b6e10bed6220a1665955aa2b75afc91eb10b3" + +[[projects]] + name = "github.com/dgrijalva/jwt-go" + packages = ["."] + revision = "dbeaa9332f19a944acb5736b4456cfcc02140e29" + version = "v3.1.0" + +[[projects]] + branch = "master" + name = "github.com/dimfeld/httppath" + packages = ["."] + revision = "ee938bf735983d53694d79138ad9820efff94c92" + +[[projects]] + name = "github.com/dimfeld/httptreemux" + packages = ["."] + revision = "8cc36ee10f84b82d0742ffcab770815c7d3f9ad7" + version = "v5.0.0" + +[[projects]] + branch = "master" + name = "github.com/goadesign/goa" + packages = [".","client","cors","design","design/apidsl","dslengine","goatest","middleware","middleware/security/jwt","uuid"] + revision = "948c35808c713f7557fe2be38f09a628c6398c2d" + +[[projects]] + branch = "master" + name = "github.com/goadesign/oauth2" + packages = [".","app","design","design/public"] + revision = "b0099d2c1bfa22c9078151481d098c7d125cb07d" + +[[projects]] + name = "github.com/gorilla/context" + packages = ["."] + revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a" + version = "v1.1" + +[[projects]] + name = "github.com/gorilla/securecookie" + packages = ["."] + revision = "667fe4e3466a040b780561fe9b51a83a3753eefc" + version = "v1.1" + +[[projects]] + name = "github.com/gorilla/sessions" + packages = ["."] + revision = "ca9ada44574153444b00d3fd9c8559e4cc95f896" + version = "v1.1" + +[[projects]] + branch = "master" + name = "github.com/hashicorp/go-immutable-radix" + packages = ["."] + revision = "8aac2701530899b64bdea735a1de8da899815220" + +[[projects]] + branch = "master" + name = "github.com/hashicorp/golang-lru" + packages = ["simplelru"] + revision = "0a025b7e63adc15a622f29b0b2c4c3848243bbf6" + +[[projects]] + name = "github.com/inconshreveable/mousetrap" + packages = ["."] + revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" + version = "v1.0" + +[[projects]] + branch = "master" + name = "github.com/manveru/faker" + packages = ["."] + revision = "9fbc68a78c4dbc7914e1a23f88f126bea4383b97" + +[[projects]] + name = "github.com/satori/go.uuid" + packages = ["."] + revision = "879c5887cd475cd7864858769793b2ceb0d44feb" + version = "v1.1.0" + +[[projects]] + name = "github.com/spf13/cobra" + packages = ["."] + revision = "7b2c5ac9fc04fc5efafb60700713d4fa609b777b" + version = "v0.0.1" + +[[projects]] + name = "github.com/spf13/pflag" + packages = ["."] + revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/zach-klippenstein/goregen" + packages = ["."] + revision = "795b5e3961ea1912fde60af417ad85e86acc0d6a" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["context","websocket"] + revision = "01c190206fbdffa42f334f4b2bf2220f50e64920" + +[[projects]] + name = "gopkg.in/h2non/gock.v1" + packages = ["."] + revision = "84d599244901620fb3eb96473eb9e50619f69b47" + version = "v1.0.6" + +[[projects]] + branch = "v2" + name = "gopkg.in/mgo.v2" + packages = [".","bson","internal/json","internal/sasl","internal/scram"] + revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "84ca012e898687ff4f2f54ce93abb83d005543c30fe8e5fa1fa6a9d7cdd89654" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..c1782bf --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,70 @@ + +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" + + +[[constraint]] + branch = "master" + name = "github.com/JormungandrK/microservice-security" + +[[constraint]] + branch = "master" + name = "github.com/JormungandrK/microservice-tools" + +[[constraint]] + branch = "master" + name = "github.com/afex/hystrix-go" + +[[constraint]] + branch = "master" + name = "github.com/goadesign/goa" + +[[constraint]] + branch = "master" + name = "github.com/goadesign/oauth2" + +[[constraint]] + name = "github.com/gorilla/securecookie" + version = "1.1.0" + +[[constraint]] + name = "github.com/gorilla/sessions" + version = "1.1.0" + +[[constraint]] + name = "github.com/satori/go.uuid" + version = "1.1.0" + +[[constraint]] + name = "github.com/spf13/cobra" + version = "0.0.1" + +[[constraint]] + branch = "master" + name = "golang.org/x/net" + +[[constraint]] + name = "gopkg.in/h2non/gock.v1" + version = "1.0.6" + +[[constraint]] + branch = "v2" + name = "gopkg.in/mgo.v2"