2018-05-16 15:43:33 +00:00
|
|
|
version: 2
|
2019-02-08 01:21:56 +00:00
|
|
|
|
2018-05-16 15:43:33 +00:00
|
|
|
jobs:
|
2019-02-08 01:21:56 +00:00
|
|
|
litmus_daily:
|
|
|
|
machine: true
|
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: ~/project
|
|
|
|
- run: docker login -u=$QUAY_USER -p=$QUAY_PASS quay.io
|
2019-04-01 21:09:19 +00:00
|
|
|
- run: docker run --entrypoint "./run_litmus_tests_oss.sh" -e ONE_TEST=src/cloud/rest_api/smoke/test_smoke.py -e BINARYPATH=/Litmus/result/bin/linux/influxd -e BOLTPATH=/Litmus/result/influxd_test/influxd.bolt -e ENGINEPATH=/Litmus/result/influxd_test --net host -v /var/run/docker.sock:/var/run/docker.sock -v ~/project:/Litmus/result quay.io/influxdb/litmus:latest
|
2019-02-08 01:21:56 +00:00
|
|
|
- run:
|
|
|
|
name: Litmus Smoke Tests Success
|
|
|
|
when: on_success
|
|
|
|
command: bash ~/project/etc/litmus_success_notify.sh Smoke
|
|
|
|
path: ~/project
|
|
|
|
- run:
|
|
|
|
name: Litmus Smoke Tests Fail
|
|
|
|
when: on_fail
|
|
|
|
command: bash ~/project/etc/litmus_fail_notify.sh Smoke
|
|
|
|
- store_artifacts:
|
|
|
|
path: ~/project
|
|
|
|
|
2019-01-25 20:18:56 +00:00
|
|
|
litmus_nightly:
|
|
|
|
machine: true
|
|
|
|
steps:
|
2019-02-09 00:55:45 +00:00
|
|
|
- attach_workspace:
|
|
|
|
at: ~/project
|
2019-01-25 20:18:56 +00:00
|
|
|
- run: docker login -u=$QUAY_USER -p=$QUAY_PASS quay.io
|
2019-02-08 01:21:56 +00:00
|
|
|
- run: docker run --entrypoint "./run_litmus_tests_oss.sh" -e TEST_LIST=tests_lists/gateway_api_tests.list -e DOCKERIMAGE=true --net host -v /var/run/docker.sock:/var/run/docker.sock -v ~/project:/Litmus/result quay.io/influxdb/litmus:latest
|
2019-01-31 23:13:34 +00:00
|
|
|
- run:
|
|
|
|
name: Litmus Nightly Tests Success
|
|
|
|
when: on_success
|
2019-02-08 01:21:56 +00:00
|
|
|
command: bash ~/project/etc/litmus_success_notify.sh Nightly
|
2019-01-31 23:13:34 +00:00
|
|
|
- run:
|
|
|
|
name: Litmus Nightly Tests Fail
|
|
|
|
when: on_fail
|
2019-02-08 01:21:56 +00:00
|
|
|
command: bash ~/project/etc/litmus_fail_notify.sh Nightly
|
2019-01-25 20:18:56 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: ~/project
|
2019-02-19 23:47:19 +00:00
|
|
|
e2e:
|
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12-node-browsers
|
2019-02-19 23:47:19 +00:00
|
|
|
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/influxdb
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
# Speed up `make build` by restoring caches from previous runs.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOCACHE
|
|
|
|
keys:
|
|
|
|
- influxdb-gocache- # Just match the most recent Go cache.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOPATH/pkg/mod
|
|
|
|
keys:
|
|
|
|
- influxdb-gomod-{{ checksum "go.sum" }} # Just match the go.sum checksum cache.
|
|
|
|
- run: sudo apt-get install -y netcat-openbsd
|
|
|
|
- run: make protoc
|
|
|
|
- run: make build
|
|
|
|
- run:
|
|
|
|
command: ./bin/linux/influxd --store=memory --e2e-testing=true
|
|
|
|
background: true
|
|
|
|
- run: make e2e
|
|
|
|
- store_test_results:
|
|
|
|
path: ui/junit-results
|
|
|
|
destination: junit-results
|
|
|
|
- store_artifacts:
|
|
|
|
path: ui/cypress/videos
|
|
|
|
destination: videos
|
|
|
|
- store_artifacts:
|
|
|
|
path: ui/cypress/screenshots
|
|
|
|
destination: screenshots
|
2018-08-27 15:34:17 +00:00
|
|
|
jstest:
|
2018-05-16 15:43:33 +00:00
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12-node-browsers
|
2019-01-08 00:37:16 +00:00
|
|
|
working_directory: /go/src/github.com/influxdata/influxdb
|
2018-08-27 15:34:17 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-28 21:20:46 +00:00
|
|
|
- run: make node_modules
|
2018-08-27 15:34:17 +00:00
|
|
|
- run: make test-js
|
2018-09-27 17:46:48 +00:00
|
|
|
- run: make chronograf_lint
|
2018-05-22 20:50:10 +00:00
|
|
|
|
2018-08-27 15:34:17 +00:00
|
|
|
gotest:
|
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12
|
ci: enable GOCACHE for Circle
With a clean GOCACHE, `make test-go` took about 30 seconds. It's hard to
tell the exact time since `make vendor` was implicitly executed in the
same block.
Now, `make test-go` uses GOCACHE and takes about 5 seconds to restore
the cache, then about 8 seconds to run through a fully cached set of
tests. If any test is actually broken or doesn't compile, this will give
us fast feedback.
But this change also runs `go test -race -count=1`, so that we fully
exercise any possible data races. That currently takes about 19 seconds.
Then finally we save GOCACHE, which has our `go test` results, and a
populated build cache for our test files, including built with the race
detector. Saving that takes about 14 seconds.
That means we took about 30 seconds originally to just run `go test
-count=1`, and now we take (5+8+19+14)=46 seconds to run plain go test
and go test with the race detector. There's probably an argument to be
made for just running with the race detector, but running both gives us
more coverage IMO, and it does allow us to run tests that aren't enabled
on race builds.
See https://circleci.com/gh/influxdata/platform/1840 for a run with full
caching.
2018-08-28 16:39:44 +00:00
|
|
|
environment:
|
|
|
|
GOCACHE: /tmp/go-cache
|
2019-02-19 23:47:19 +00:00
|
|
|
GOFLAGS: '-mod=readonly -p=2' # Go on Circle thinks 32 CPUs are available, but there aren't.
|
2019-01-08 00:37:16 +00:00
|
|
|
working_directory: /go/src/github.com/influxdata/influxdb
|
2018-05-16 15:43:33 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-28 18:58:55 +00:00
|
|
|
|
|
|
|
# Populate GOCACHE.
|
ci: enable GOCACHE for Circle
With a clean GOCACHE, `make test-go` took about 30 seconds. It's hard to
tell the exact time since `make vendor` was implicitly executed in the
same block.
Now, `make test-go` uses GOCACHE and takes about 5 seconds to restore
the cache, then about 8 seconds to run through a fully cached set of
tests. If any test is actually broken or doesn't compile, this will give
us fast feedback.
But this change also runs `go test -race -count=1`, so that we fully
exercise any possible data races. That currently takes about 19 seconds.
Then finally we save GOCACHE, which has our `go test` results, and a
populated build cache for our test files, including built with the race
detector. Saving that takes about 14 seconds.
That means we took about 30 seconds originally to just run `go test
-count=1`, and now we take (5+8+19+14)=46 seconds to run plain go test
and go test with the race detector. There's probably an argument to be
made for just running with the race detector, but running both gives us
more coverage IMO, and it does allow us to run tests that aren't enabled
on race builds.
See https://circleci.com/gh/influxdata/platform/1840 for a run with full
caching.
2018-08-28 16:39:44 +00:00
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOCACHE
|
|
|
|
keys:
|
2019-01-23 20:19:05 +00:00
|
|
|
- influxdb-gocache-{{ .Branch }}-{{ .Revision }} # Matches when retrying a single run.
|
2019-02-19 23:47:19 +00:00
|
|
|
- influxdb-gocache-{{ .Branch }}- # Matches a new commit on an existing branch.
|
|
|
|
- influxdb-gocache- # Matches a new branch.
|
2018-10-11 21:11:36 +00:00
|
|
|
# Populate GOPATH/pkg.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOPATH/pkg/mod
|
|
|
|
keys:
|
2019-02-19 23:47:19 +00:00
|
|
|
- influxdb-gomod-{{ checksum "go.sum" }} # Matches based on go.sum checksum.
|
2018-08-28 18:58:55 +00:00
|
|
|
- run: make test-go # This uses the test cache so it may succeed or fail quickly.
|
2018-05-22 22:19:04 +00:00
|
|
|
- run: make vet
|
2018-10-08 18:16:06 +00:00
|
|
|
- run: make checkfmt
|
2018-10-10 16:31:37 +00:00
|
|
|
- run: make checktidy
|
2018-11-09 22:31:15 +00:00
|
|
|
- run: make test-go-race # This doesn't use the test cache because of -count=1, so it will not complete quickly.
|
2018-05-22 20:50:10 +00:00
|
|
|
# TODO add these checks to the Makefile
|
|
|
|
# - run: go get -v -t -d ./...
|
2018-11-01 16:12:38 +00:00
|
|
|
|
2018-12-12 17:07:42 +00:00
|
|
|
- run: GO111MODULE=on go mod vendor # staticcheck looks in vendor for dependencies.
|
2018-11-20 19:02:13 +00:00
|
|
|
- run: GO111MODULE=on go install honnef.co/go/tools/cmd/staticcheck # Install staticcheck from the version we specify in go.mod.
|
|
|
|
- run: staticcheck ./...
|
2018-11-01 16:12:38 +00:00
|
|
|
|
ci: enable GOCACHE for Circle
With a clean GOCACHE, `make test-go` took about 30 seconds. It's hard to
tell the exact time since `make vendor` was implicitly executed in the
same block.
Now, `make test-go` uses GOCACHE and takes about 5 seconds to restore
the cache, then about 8 seconds to run through a fully cached set of
tests. If any test is actually broken or doesn't compile, this will give
us fast feedback.
But this change also runs `go test -race -count=1`, so that we fully
exercise any possible data races. That currently takes about 19 seconds.
Then finally we save GOCACHE, which has our `go test` results, and a
populated build cache for our test files, including built with the race
detector. Saving that takes about 14 seconds.
That means we took about 30 seconds originally to just run `go test
-count=1`, and now we take (5+8+19+14)=46 seconds to run plain go test
and go test with the race detector. There's probably an argument to be
made for just running with the race detector, but running both gives us
more coverage IMO, and it does allow us to run tests that aren't enabled
on race builds.
See https://circleci.com/gh/influxdata/platform/1840 for a run with full
caching.
2018-08-28 16:39:44 +00:00
|
|
|
- save_cache:
|
|
|
|
name: Saving GOCACHE
|
2019-01-23 20:19:05 +00:00
|
|
|
key: influxdb-gocache-{{ .Branch }}-{{ .Revision }}
|
ci: enable GOCACHE for Circle
With a clean GOCACHE, `make test-go` took about 30 seconds. It's hard to
tell the exact time since `make vendor` was implicitly executed in the
same block.
Now, `make test-go` uses GOCACHE and takes about 5 seconds to restore
the cache, then about 8 seconds to run through a fully cached set of
tests. If any test is actually broken or doesn't compile, this will give
us fast feedback.
But this change also runs `go test -race -count=1`, so that we fully
exercise any possible data races. That currently takes about 19 seconds.
Then finally we save GOCACHE, which has our `go test` results, and a
populated build cache for our test files, including built with the race
detector. Saving that takes about 14 seconds.
That means we took about 30 seconds originally to just run `go test
-count=1`, and now we take (5+8+19+14)=46 seconds to run plain go test
and go test with the race detector. There's probably an argument to be
made for just running with the race detector, but running both gives us
more coverage IMO, and it does allow us to run tests that aren't enabled
on race builds.
See https://circleci.com/gh/influxdata/platform/1840 for a run with full
caching.
2018-08-28 16:39:44 +00:00
|
|
|
paths:
|
|
|
|
- /tmp/go-cache
|
|
|
|
when: always
|
2018-10-11 21:11:36 +00:00
|
|
|
- save_cache:
|
|
|
|
name: Saving GOPATH/pkg/mod
|
2019-01-23 20:19:05 +00:00
|
|
|
key: influxdb-gomod-{{ checksum "go.sum" }}
|
2018-10-11 21:11:36 +00:00
|
|
|
paths:
|
|
|
|
- /go/pkg/mod
|
|
|
|
when: always
|
2018-05-22 20:42:32 +00:00
|
|
|
|
2018-12-20 17:13:41 +00:00
|
|
|
build:
|
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12-node-browsers
|
2018-12-20 17:13:41 +00:00
|
|
|
environment:
|
|
|
|
GOCACHE: /tmp/go-cache
|
2019-02-19 23:47:19 +00:00
|
|
|
GOFLAGS: '-mod=readonly -p=4' # Go on Circle thinks 32 CPUs are available, but there aren't.
|
2019-01-08 00:37:16 +00:00
|
|
|
working_directory: /go/src/github.com/influxdata/influxdb
|
2018-12-20 17:13:41 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-03-13 22:48:30 +00:00
|
|
|
- run: make checkcommit
|
2018-12-20 17:13:41 +00:00
|
|
|
|
|
|
|
# Speed up `make build` by restoring caches from previous runs.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOCACHE
|
|
|
|
keys:
|
2019-01-23 20:19:05 +00:00
|
|
|
- influxdb-gocache- # Just match the most recent Go cache.
|
2018-12-20 17:13:41 +00:00
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOPATH/pkg/mod
|
|
|
|
keys:
|
2019-01-23 20:19:05 +00:00
|
|
|
- influxdb-gomod-{{ checksum "go.sum" }} # Just match the go.sum checksum cache.
|
2019-02-19 23:47:19 +00:00
|
|
|
- run: make protoc
|
2018-12-20 17:13:41 +00:00
|
|
|
- run: make build
|
2019-02-08 01:21:56 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
2019-02-19 23:47:19 +00:00
|
|
|
- project
|
2019-02-08 01:21:56 +00:00
|
|
|
- bin/linux/influxd
|
|
|
|
- bin/linux/influx
|
|
|
|
- etc/litmus_success_notify.sh
|
|
|
|
- etc/litmus_fail_notify.sh
|
2018-12-20 17:13:41 +00:00
|
|
|
|
2019-01-23 20:19:05 +00:00
|
|
|
deploy-nightly:
|
2018-05-22 20:42:32 +00:00
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12-node-browsers
|
2018-08-28 21:57:17 +00:00
|
|
|
environment:
|
|
|
|
GOCACHE: /tmp/go-cache
|
2019-02-19 23:47:19 +00:00
|
|
|
GOFLAGS: '-mod=readonly -p=4' # Go on Circle thinks 32 CPUs are available, but there aren't.
|
2019-01-08 00:37:16 +00:00
|
|
|
working_directory: /go/src/github.com/influxdata/influxdb
|
2018-05-22 20:42:32 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-28 21:57:17 +00:00
|
|
|
|
|
|
|
# Speed up `make nightly` by restoring caches from previous runs.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOCACHE
|
|
|
|
keys:
|
2019-01-23 20:19:05 +00:00
|
|
|
- influxdb-gocache- # Just match the most recent Go cache.
|
2018-10-11 21:11:36 +00:00
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOPATH/pkg/mod
|
|
|
|
keys:
|
2019-01-23 20:19:05 +00:00
|
|
|
- influxdb-gomod-{{ checksum "go.sum" }} # Just match the go.sum checksum cache.
|
2018-07-17 22:23:39 +00:00
|
|
|
- setup_remote_docker
|
2019-01-14 22:30:12 +00:00
|
|
|
- run:
|
2019-02-19 23:47:19 +00:00
|
|
|
name: 'Docker Login'
|
2019-01-14 22:30:12 +00:00
|
|
|
command: docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
|
|
|
|
- run:
|
2019-02-19 23:47:19 +00:00
|
|
|
name: 'Build nightly'
|
2019-01-14 22:30:12 +00:00
|
|
|
command: make nightly
|
2019-02-10 06:57:42 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- etc/litmus_success_notify.sh
|
2019-02-19 23:47:19 +00:00
|
|
|
- etc/litmus_fail_notify.sh
|
2019-02-08 01:21:56 +00:00
|
|
|
|
2019-01-23 20:19:05 +00:00
|
|
|
release:
|
|
|
|
docker:
|
2019-01-22 19:45:57 +00:00
|
|
|
- image: circleci/golang:1.12-node-browsers
|
2019-01-23 20:19:05 +00:00
|
|
|
environment:
|
|
|
|
GOCACHE: /tmp/go-cache
|
2019-02-19 23:47:19 +00:00
|
|
|
GOFLAGS: '-mod=readonly -p=4' # Go on Circle thinks 32 CPUs are available, but there aren't.
|
2019-01-23 20:19:05 +00:00
|
|
|
DOCKER_VERSION: 2.0.0-alpha
|
|
|
|
working_directory: /go/src/github.com/influxdata/influxdb
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
# Speed up `make nightly` by restoring caches from previous runs.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOCACHE
|
|
|
|
keys:
|
|
|
|
- influxdb-gocache- # Just match the most recent Go cache.
|
|
|
|
- restore_cache:
|
|
|
|
name: Restoring GOPATH/pkg/mod
|
|
|
|
keys:
|
|
|
|
- influxdb-gomod-{{ checksum "go.sum" }} # Just match the go.sum checksum cache.
|
|
|
|
- setup_remote_docker
|
|
|
|
- run:
|
2019-02-19 23:47:19 +00:00
|
|
|
name: 'Docker Login'
|
2019-01-23 20:19:05 +00:00
|
|
|
command: docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
|
|
|
|
- run:
|
2019-02-19 23:47:19 +00:00
|
|
|
name: 'Build release'
|
2019-01-23 20:19:05 +00:00
|
|
|
command: make release
|
2018-05-22 20:42:32 +00:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2018-12-20 16:34:26 +00:00
|
|
|
build:
|
2018-05-22 20:42:32 +00:00
|
|
|
jobs:
|
2018-08-27 15:34:17 +00:00
|
|
|
- gotest
|
|
|
|
- jstest
|
2018-12-20 17:13:41 +00:00
|
|
|
- build
|
2019-02-08 01:21:56 +00:00
|
|
|
- litmus_daily:
|
|
|
|
requires:
|
|
|
|
- build
|
2019-02-21 20:28:38 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: /^(?!pull\/).*$/
|
2018-12-20 16:34:26 +00:00
|
|
|
|
2019-02-19 23:47:19 +00:00
|
|
|
e2e:
|
|
|
|
jobs:
|
|
|
|
- e2e
|
2018-12-13 21:48:09 +00:00
|
|
|
nightly:
|
|
|
|
triggers:
|
|
|
|
- schedule:
|
2019-02-19 23:47:19 +00:00
|
|
|
cron: '0 7 * * *'
|
2018-12-13 21:48:09 +00:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
jobs:
|
2018-12-16 09:56:02 +00:00
|
|
|
- gotest
|
|
|
|
- jstest
|
2019-01-23 20:19:05 +00:00
|
|
|
- deploy-nightly:
|
2018-12-13 21:48:09 +00:00
|
|
|
requires:
|
|
|
|
- gotest
|
|
|
|
- jstest
|
|
|
|
filters:
|
|
|
|
branches:
|
2018-12-16 09:56:02 +00:00
|
|
|
only: master
|
2019-01-25 20:18:56 +00:00
|
|
|
- litmus_nightly:
|
|
|
|
requires:
|
|
|
|
- deploy-nightly
|
|
|
|
|
2019-01-23 20:19:05 +00:00
|
|
|
release:
|
|
|
|
jobs:
|
2019-01-23 21:24:28 +00:00
|
|
|
- gotest:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /^v[0-9]+\.[0-9]+\.[0-9]+-alpha\.[0-9]+$/
|
|
|
|
|
|
|
|
- jstest:
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /^v[0-9]+\.[0-9]+\.[0-9]+-alpha\.[0-9]+$/
|
2019-01-23 20:19:05 +00:00
|
|
|
- release:
|
|
|
|
requires:
|
|
|
|
- gotest
|
|
|
|
- jstest
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
|
|
|
tags:
|
|
|
|
only: /^v[0-9]+\.[0-9]+\.[0-9]+-alpha\.[0-9]+$/
|