Skip to content

Commit

Permalink
Use a specific lint docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomorain committed Jul 5, 2018
1 parent 43130ad commit 5990828
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 31 deletions.
21 changes: 7 additions & 14 deletions .circleci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,14 @@ jobs:
- codecov/upload:
path: coverage.txt
lint:
executor: go
docker:
- image: supinf/gometalinter:latest
environment:
CGO_ENABLED: 0
working_directory: /go/src/github.com/CircleCI-Public/circleci-cli
steps:
- checkout
- restore_cache:
keys: [v1-gometalinter-]
- run:
name: Install
command: |
[[ -e /go/bin/gometalinter ]] && exit
go get -u github.com/alecthomas/gometalinter
gometalinter --install
- run: make lint
- save_cache:
key: v1-gometalinter-{{ checksum "/go/bin/gometalinter" }}
paths: [/go/bin/*]
- checkout
- run: gometalinter --deadline 60s --vendor ./...

deploy:
executor: go
Expand Down
19 changes: 4 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,14 @@ jobs:
&pr=$CIRCLE_PR_NUMBER"
lint:
docker:
- image: circleci/golang:1.10
- image: supinf/gometalinter:latest
environment:
CGO_ENABLED: 0
working_directory: /go/src/github.com/CircleCI-Public/circleci-cli
steps:
- checkout
- restore_cache:
keys:
- v1-gometalinter-
- run:
name: Install
command: |
[[ -e /go/bin/gometalinter ]] && exit
go get -u github.com/alecthomas/gometalinter
gometalinter --install
- run:
command: make lint
- save_cache:
key: v1-gometalinter-{{ checksum "/go/bin/gometalinter" }}
paths:
- /go/bin/*
command: gometalinter --deadline 60s --vendor ./...
deploy:
docker:
- image: circleci/golang:1.10
Expand Down
4 changes: 2 additions & 2 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func buildAndOrbQuery(ctx context.Context, logger *logger.Logger, configPath str

request := client.NewAuthorizedRequest(viper.GetString("token"), query)
request.Var("config", config)
client := client.NewClient(viper.GetString("endpoint"), logger)
graphQLclient := client.NewClient(viper.GetString("endpoint"), logger)

err = client.Run(ctx, request, response)
err = graphQLclient.Run(ctx, request, response)

if err != nil {
return errors.Wrap(err, "Unable to validate config")
Expand Down

0 comments on commit 5990828

Please sign in to comment.