diff --git a/.gitignore b/.gitignore index 1c7ab4e..4754c5f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ keys ssh-keys .keys .ssh-keys + +# Go Dependency Management +vendor \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index b5593d4..3299fed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,16 +12,13 @@ before_install: - git config --global url."git@github.com:".insteadOf "https://github.com/" - go get github.com/axw/gocov/gocov - go get github.com/AlekSi/gocov-xml - - go get gopkg.in/h2non/gock.v1 - - go get github.com/JormungandrK/microservice-tools - - go get -u github.com/JormungandrK/microservice-security/... - - go get github.com/goadesign/goa/... - - go get gopkg.in/mgo.v2 + - 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/user-microservice/... | 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 498a147..a2c1ac0 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/user-microservice + +WORKDIR /go/src/github.com/JormungandrK/user-microservice + +RUN go get -u -v github.com/golang/dep/cmd/dep +RUN dep ensure -v RUN go install github.com/JormungandrK/user-microservice diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..c93a1c4 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,183 @@ +# 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 = ["acl","auth","chain","flow","jwt","oauth2","saml","tools"] + revision = "f8001122d4891c84abf8cadd780c071d2a409b3b" + +[[projects]] + branch = "master" + name = "github.com/JormungandrK/microservice-tools" + packages = ["config","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/beevik/etree" + packages = ["."] + revision = "15a30b44cfd6c5a16a7ddfe271bf146aaf2d3195" + version = "v1.0.0" + +[[projects]] + name = "github.com/crewjam/saml" + packages = [".","logger","samlsp","xmlenc"] + revision = "6b5dd2d26974f7f5e59132ef5921fab7993794d7" + version = "0.2.0" + +[[projects]] + name = "github.com/davecgh/go-spew" + packages = ["spew"] + revision = "346938d642f2ec3594ed81d874461961cd0faa76" + version = "v1.1.0" + +[[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","design","design/apidsl","dslengine","goatest","middleware","middleware/security/jwt","uuid"] + revision = "948c35808c713f7557fe2be38f09a628c6398c2d" + +[[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]] + name = "github.com/jonboulle/clockwork" + packages = ["."] + revision = "2eee05ed794112d45db504eb05aa693efd2b8b09" + version = "v0.1.0" + +[[projects]] + branch = "master" + name = "github.com/manveru/faker" + packages = ["."] + revision = "f5baee6d308c0991462da8a03d93a8c61e6cd047" + +[[projects]] + name = "github.com/ory/ladon" + packages = [".","compiler"] + revision = "4223d97b7a16808bc1213cc641d529e764e67eea" + version = "v0.8.3" + +[[projects]] + name = "github.com/pborman/uuid" + packages = ["."] + revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53" + version = "v1.1" + +[[projects]] + name = "github.com/pkg/errors" + packages = ["."] + revision = "645ef00459ed84a119197bfb8d8205042c6df63d" + version = "v0.8.0" + +[[projects]] + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + revision = "792786c7400a136282c1664665ae0a8db921c6c2" + version = "v1.0.0" + +[[projects]] + branch = "master" + name = "github.com/russellhaering/goxmldsig" + packages = [".","etreeutils","types"] + revision = "b7efc6231e45b10bfd779852831c8bb59b350ec5" + +[[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]] + name = "github.com/stretchr/testify" + packages = ["assert","require"] + revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" + version = "v1.1.4" + +[[projects]] + branch = "master" + name = "github.com/zach-klippenstein/goregen" + packages = ["."] + revision = "795b5e3961ea1912fde60af417ad85e86acc0d6a" + +[[projects]] + branch = "master" + name = "golang.org/x/crypto" + packages = ["bcrypt","blowfish","ripemd160"] + revision = "bd6f299fb381e4c3393d1c4b1f0b94f5e77650c8" + +[[projects]] + branch = "master" + name = "golang.org/x/net" + packages = ["context","websocket"] + revision = "01c190206fbdffa42f334f4b2bf2220f50e64920" + +[[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 = "1f4a91482508077130df32d9add27fc85ab0886db84dcf3ffc27c72161eae6d8" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..899cae7 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,46 @@ + +# 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/goadesign/goa" + +[[constraint]] + name = "github.com/spf13/cobra" + version = "0.0.1" + +[[constraint]] + branch = "master" + name = "golang.org/x/crypto" + +[[constraint]] + branch = "v2" + name = "gopkg.in/mgo.v2" diff --git a/Makefile b/Makefile index 60dc305..a28670c 100644 --- a/Makefile +++ b/Makefile @@ -9,4 +9,4 @@ push: build docker push ${IMAGE} run: build - docker run -p 8080:8080 ${IMAGE} + docker run ${ARGS} ${IMAGE}