chore(ci): Update make to build for each PR

pull/10616/head
AJ Bond 2018-12-20 12:13:41 -05:00
parent bd2105c923
commit da67b392da
2 changed files with 32 additions and 3 deletions

View File

@ -70,6 +70,32 @@ jobs:
- /go/pkg/mod
when: always
build:
docker:
- image: circleci/golang:1.11-node-browsers
environment:
GOCACHE: /tmp/go-cache
GOFLAGS: "-mod=readonly -p=4" # Go on Circle thinks 32 CPUs are available, but there aren't.
working_directory: /go/src/github.com/influxdata/platform
steps:
- checkout
# Speed up `make build` by restoring caches from previous runs.
- restore_cache:
name: Restoring GOCACHE
keys:
- platform-gocache- # Just match the most recent Go cache.
- restore_cache:
name: Restoring GOPATH/pkg/mod
keys:
- platform-gomod-{{ checksum "go.sum" }} # Just match the go.sum checksum cache.
- restore_cache:
name: Restore Yarn package cache
keys:
- chronograf-npm-packages-{{ checksum "ui/package-lock.json" }}
- run: make build
deploy:
docker:
- image: circleci/golang:1.11-node-browsers
@ -95,22 +121,23 @@ jobs:
- chronograf-npm-packages-{{ checksum "ui/package-lock.json" }}
- setup_remote_docker
- run: |
docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
make nightly
workflows:
version: 2
build:
jobs:
- gotest
- jstest
- build
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
cron: "0 7 * * *"
filters:
branches:
only:

View File

@ -117,7 +117,9 @@ vet:
bench:
$(GO_TEST) -bench=. -run=^$$ ./...
nightly: all
build: all
nightly: build
env GO111MODULE=on go run github.com/goreleaser/goreleaser --snapshot --rm-dist --publish-snapshots
clean: