Skip to content

Commit

Permalink
ci: Resolve CI build issue (#160)
Browse files Browse the repository at this point in the history
Signed-off-by: aeneasr <aeneas@ory.sh>
  • Loading branch information
aeneasr committed Apr 1, 2019
1 parent 8441bd5 commit 43e500d
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 12 deletions.
23 changes: 12 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ version: 2
jobs:
format:
docker:
- image: circleci/golang:1.11
- image: circleci/golang:1.12
working_directory: /go/src/github.com/ory/oathkeeper
steps:
# This is disabled for now because goimports is really slow when go modules are used, see
# https://github.com/golang/go/issues/27287
#
# - run:
# name: Enable go1.11 modules
# name: Enable go1.12 modules
# command: |
# echo 'export GO111MODULE=on' >> $BASH_ENV
# source $BASH_ENV
- checkout
- run:
name: Enable go1.11 modules
name: Enable go1.12 modules
command: |
echo 'export GO111MODULE=on' >> $BASH_ENV
source $BASH_ENV
Expand All @@ -30,7 +30,7 @@ jobs:

# swagger:
# docker:
# - image: circleci/golang:1.11
# - image: circleci/golang:1.12
# working_directory: /go/src/github.com/ory/oathkeeper
# steps:
# - checkout
Expand All @@ -41,7 +41,7 @@ jobs:

test:
docker:
- image: circleci/golang:1.11
- image: circleci/golang:1.12
environment:
- TEST_DATABASE_POSTGRESQL=postgres://test:test@localhost:5432/oathkeeper?sslmode=disable
- TEST_DATABASE_MYSQL=root:test@(localhost:3306)/mysql?parseTime=true
Expand All @@ -61,13 +61,13 @@ jobs:
working_directory: /go/src/github.com/ory/oathkeeper
steps:
- run:
name: Enable go1.11 modules
name: Enable go1.12 modules
command: |
echo 'export GO111MODULE=on' >> $BASH_ENV
source $BASH_ENV
- checkout
- run: go mod download
- run: go get -u github.com/mattn/goveralls golang.org/x/tools/cmd/cover github.com/ory/go-acc
- run: go install github.com/ory/go-acc github.com/mattn/goveralls
- run: go-acc -o coverage.txt ./... -- -failfast -timeout=20m
- run: test -z "$CIRCLE_PR_NUMBER" && goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN || echo "forks are not allowed to push to coveralls"

Expand All @@ -83,7 +83,7 @@ jobs:

release-docker:
docker:
- image: circleci/golang:1.11
- image: circleci/golang:1.12
working_directory: /go/src/github.com/ory/oathkeeper
steps:
- checkout
Expand Down Expand Up @@ -127,16 +127,17 @@ jobs:

release-binaries:
docker:
- image: circleci/golang:1.11
- image: circleci/golang:1.12
working_directory: /go/src/github.com/ory/oathkeeper
steps:
- run:
name: Enable go1.11 modules
name: Enable go1.12 modules
command: |
echo 'export GO111MODULE=on' >> $BASH_ENV
source $BASH_ENV
- checkout
- run: go get -u github.com/mitchellh/gox github.com/tcnksm/ghr
- run: go mod download
- run: go install github.com/mitchellh/gox github.com/tcnksm/ghr
- run: |
gox -parallel=2 -ldflags "-X github.com/ory/oathkeeper/cmd.Version=`git describe --tags` -X github.com/ory/oathkeeper/cmd.BuildTime=`TZ=UTC date -u '+%Y-%m-%dT%H:%M:%SZ'` -X github.com/ory/oathkeeper/cmd.GitHash=`git rev-parse HEAD`" -output "dist/{{.Dir}}-{{.OS}}-{{.Arch}}";
- run: ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace `git describe --tags` dist/
Expand Down
14 changes: 14 additions & 0 deletions cmd/tools.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// +build tools

package cmd

import (
_ "github.com/go-swagger/go-swagger/cmd/swagger"
_ "github.com/mattn/goveralls"
_ "github.com/mitchellh/gox"
_ "github.com/tcnksm/ghr"
_ "golang.org/x/tools/cmd/cover"
_ "golang.org/x/tools/cmd/goimports"

_ "github.com/ory/go-acc"
)
24 changes: 23 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
module github.com/ory/oathkeeper

require (
github.com/Songmu/retry v0.1.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-errors/errors v1.0.1
github.com/go-openapi/analysis v0.19.0 // indirect
github.com/go-openapi/errors v0.19.0 // indirect
github.com/go-openapi/inflect v0.19.0 // indirect
github.com/go-openapi/loads v0.19.0 // indirect
github.com/go-openapi/runtime v0.19.0 // indirect
github.com/go-openapi/spec v0.19.0 // indirect
github.com/go-openapi/strfmt v0.19.0 // indirect
github.com/go-openapi/swag v0.19.0 // indirect
github.com/go-openapi/validate v0.19.0 // indirect
github.com/go-sql-driver/mysql v1.4.1
github.com/go-swagger/go-swagger v0.19.0
github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 // indirect
github.com/golang/mock v1.2.0
github.com/gorilla/sessions v1.1.3 // indirect
github.com/gorilla/handlers v1.4.0 // indirect
github.com/jessevdk/go-flags v1.4.0 // indirect
github.com/jmoiron/sqlx v1.2.0
github.com/julienschmidt/httprouter v1.2.0
github.com/lib/pq v1.0.0
github.com/mattn/go-colorable v0.1.1 // indirect
github.com/mattn/goveralls v0.0.2
github.com/meatballhat/negroni-logrus v0.0.0-20170801195057-31067281800f
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/gox v1.0.0
github.com/ory/dockertest v3.3.4+incompatible
github.com/ory/fosite v0.29.0
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90
github.com/ory/go-convenience v0.1.0
github.com/ory/graceful v0.1.0
github.com/ory/herodot v0.6.0
Expand All @@ -28,9 +46,13 @@ require (
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.1
github.com/stretchr/testify v1.3.0
github.com/tcnksm/ghr v0.12.0
github.com/tcnksm/go-gitconfig v0.1.2 // indirect
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
github.com/urfave/negroni v1.0.0
golang.org/x/oauth2 v0.0.0-20190212230446-3e8b2be13635
golang.org/x/tools v0.0.0-20190118193359-16909d206f00
gopkg.in/resty.v1 v1.10.3
gopkg.in/square/go-jose.v2 v2.2.2
)
Loading

0 comments on commit 43e500d

Please sign in to comment.