build: clean up our CircleCI configs (#20397)
* Delete unused configs * Delete unused test steps * Reorder our main config file to start with top-level pipelines, and to group conceptually-related jobs * Introduce new jobs to pull dependencies, to reduce duplicated work across test/lint/build steps * Rename our caches to bust our current huge sizes * Use unique names for caches per-step, to avoid conflicts * Fix result collection for JS testspull/20412/head
parent
afdcb18655
commit
9b8c81c49c
1136
.circleci/config.yml
1136
.circleci/config.yml
File diff suppressed because it is too large
Load Diff
8
Makefile
8
Makefile
|
@ -46,6 +46,8 @@ endif
|
||||||
|
|
||||||
# Allow for `go test` to be swapped out by other tooling, i.e. `gotestsum`
|
# Allow for `go test` to be swapped out by other tooling, i.e. `gotestsum`
|
||||||
GO_TEST_CMD=go test
|
GO_TEST_CMD=go test
|
||||||
|
# Allow for a subset of tests to be specified.
|
||||||
|
GO_TEST_PATHS=./...
|
||||||
|
|
||||||
# Test vars can be used by all recursive Makefiles
|
# Test vars can be used by all recursive Makefiles
|
||||||
export PKG_CONFIG:=$(PWD)/scripts/pkg-config.sh
|
export PKG_CONFIG:=$(PWD)/scripts/pkg-config.sh
|
||||||
|
@ -149,7 +151,7 @@ test-js: node_modules
|
||||||
make -C ui test
|
make -C ui test
|
||||||
|
|
||||||
test-go:
|
test-go:
|
||||||
$(GO_TEST) ./...
|
$(GO_TEST) $(GO_TEST_PATHS)
|
||||||
|
|
||||||
test-influxql-integration:
|
test-influxql-integration:
|
||||||
$(GO_TEST) -mod=readonly ./influxql/_v1tests
|
$(GO_TEST) -mod=readonly ./influxql/_v1tests
|
||||||
|
@ -159,12 +161,12 @@ test-influxql-validation:
|
||||||
|
|
||||||
test-integration: GO_TAGS=integration
|
test-integration: GO_TAGS=integration
|
||||||
test-integration:
|
test-integration:
|
||||||
$(GO_TEST) -count=1 ./...
|
$(GO_TEST) -count=1 $(GO_TEST_PATHS)
|
||||||
|
|
||||||
test: test-go test-js
|
test: test-go test-js
|
||||||
|
|
||||||
test-go-race:
|
test-go-race:
|
||||||
$(GO_TEST) -v -race -count=1 ./...
|
$(GO_TEST) -v -race -count=1 $(GO_TEST_PATHS)
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
$(GO_VET) -v ./...
|
$(GO_VET) -v ./...
|
||||||
|
|
|
@ -1,138 +0,0 @@
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
main:
|
|
||||||
jobs:
|
|
||||||
- build
|
|
||||||
- deploy-nightly:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only: master
|
|
||||||
- deploy-pre-release:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
tags:
|
|
||||||
only: /^[0-9]+(\.[0-9]+)*(\S*)([a|rc|beta]([0-9]+))+$/
|
|
||||||
- deploy-release:
|
|
||||||
requires:
|
|
||||||
- build
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
tags:
|
|
||||||
only: /^[0-9]+(\.[0-9]+)*$/
|
|
||||||
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
environment:
|
|
||||||
DOCKER_TAG: chronograf-20180327
|
|
||||||
machine: true
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run: |
|
|
||||||
ls -lah
|
|
||||||
pwd
|
|
||||||
- run: ./etc/scripts/docker/pull.sh
|
|
||||||
- run:
|
|
||||||
name: "Run Tests"
|
|
||||||
command: >
|
|
||||||
./etc/scripts/docker/run.sh
|
|
||||||
--debug
|
|
||||||
--test
|
|
||||||
--no-build
|
|
||||||
- persist_to_workspace:
|
|
||||||
root: /home/circleci
|
|
||||||
paths:
|
|
||||||
- project
|
|
||||||
|
|
||||||
deploy-nightly:
|
|
||||||
environment:
|
|
||||||
DOCKER_TAG: chronograf-20180327
|
|
||||||
machine: true
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /home/circleci
|
|
||||||
- run: |
|
|
||||||
./etc/scripts/docker/run.sh \
|
|
||||||
--debug \
|
|
||||||
--clean \
|
|
||||||
--package \
|
|
||||||
--platform all \
|
|
||||||
--arch all \
|
|
||||||
--upload \
|
|
||||||
--nightly \
|
|
||||||
--bucket=dl.influxdata.com/chronograf/releases
|
|
||||||
cp build/linux/static_amd64/chronograf .
|
|
||||||
cp build/linux/static_amd64/chronoctl .
|
|
||||||
docker build -t chronograf .
|
|
||||||
docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:nightly
|
|
||||||
docker push quay.io/influxdb/chronograf:nightly
|
|
||||||
- store_artifacts:
|
|
||||||
path: ./build/
|
|
||||||
|
|
||||||
deploy-pre-release:
|
|
||||||
environment:
|
|
||||||
DOCKER_TAG: chronograf-20180327
|
|
||||||
machine: true
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /home/circleci
|
|
||||||
- run: |
|
|
||||||
./etc/scripts/docker/run.sh \
|
|
||||||
--clean \
|
|
||||||
--debug \
|
|
||||||
--release \
|
|
||||||
--package \
|
|
||||||
--platform all \
|
|
||||||
--arch all \
|
|
||||||
--upload-overwrite \
|
|
||||||
--upload \
|
|
||||||
--bucket dl.influxdata.com/chronograf/releases
|
|
||||||
cp build/linux/static_amd64/chronograf .
|
|
||||||
cp build/linux/static_amd64/chronoctl .
|
|
||||||
docker build -t chronograf .
|
|
||||||
docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:${CIRCLE_SHA1:0:7}
|
|
||||||
docker push quay.io/influxdb/chronograf:${CIRCLE_SHA1:0:7}
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:${CIRCLE_TAG}
|
|
||||||
docker push quay.io/influxdb/chronograf:${CIRCLE_TAG}
|
|
||||||
- store_artifacts:
|
|
||||||
path: ./build/
|
|
||||||
|
|
||||||
deploy-release:
|
|
||||||
environment:
|
|
||||||
DOCKER_TAG: chronograf-20180327
|
|
||||||
machine: true
|
|
||||||
steps:
|
|
||||||
- attach_workspace:
|
|
||||||
at: /home/circleci
|
|
||||||
- run: |
|
|
||||||
./etc/scripts/docker/run.sh \
|
|
||||||
--clean \
|
|
||||||
--debug \
|
|
||||||
--release \
|
|
||||||
--package \
|
|
||||||
--platform all \
|
|
||||||
--arch all \
|
|
||||||
--upload-overwrite \
|
|
||||||
--upload \
|
|
||||||
--bucket dl.influxdata.com/chronograf/releases
|
|
||||||
cp build/linux/static_amd64/chronograf .
|
|
||||||
cp build/linux/static_amd64/chronoctl .
|
|
||||||
docker build -t chronograf .
|
|
||||||
docker login -u "$QUAY_USER" -p $QUAY_PASS quay.io
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:${CIRCLE_SHA1:0:7}
|
|
||||||
docker push quay.io/influxdb/chronograf:${CIRCLE_SHA1:0:7}
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:${CIRCLE_TAG}
|
|
||||||
docker push quay.io/influxdb/chronograf:${CIRCLE_TAG}
|
|
||||||
docker tag chronograf quay.io/influxdb/chronograf:latest
|
|
||||||
docker push quay.io/influxdb/chronograf:latest
|
|
||||||
- store_artifacts:
|
|
||||||
path: ./build/
|
|
|
@ -1,47 +0,0 @@
|
||||||
version: 2
|
|
||||||
jobs:
|
|
||||||
selenium_accept:
|
|
||||||
docker:
|
|
||||||
- image: circleci/node:lts-stretch-browsers
|
|
||||||
- image: quay.io/influxdb/influx:nightly
|
|
||||||
command: [--e2e-testing=true]
|
|
||||||
steps:
|
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
name: Environment check
|
|
||||||
command: |
|
|
||||||
free -h
|
|
||||||
df -h
|
|
||||||
git --version
|
|
||||||
node --version && npm --version
|
|
||||||
docker --version
|
|
||||||
google-chrome --version && which google-chrome && chromedriver --version && which chromedriver
|
|
||||||
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8086)" != "200" ]]; do sleep 5; done' || false
|
|
||||||
|
|
||||||
- run:
|
|
||||||
name: Selenium tests
|
|
||||||
command: |
|
|
||||||
set +e
|
|
||||||
npm install
|
|
||||||
[ -f "/usr/local/bin/chromedriver" ] && cp /usr/local/bin/chromedriver node_modules/chromedriver/lib/chromedriver/chromedriver
|
|
||||||
./node_modules/chromedriver/bin/chromedriver --version
|
|
||||||
npm test; TEST_RESULT=$?
|
|
||||||
npm run report:html
|
|
||||||
npm run report:junit
|
|
||||||
mkdir -p ~/test-results/cucumber
|
|
||||||
mkdir -p ~/artifacts/html
|
|
||||||
cp ~/project/report/cucumber_report.html ~/artifacts/html/cucumber_report.html
|
|
||||||
cp ~/project/report/cucumber_junit.xml ~/test-results/cucumber/report.xml
|
|
||||||
cp ~/project/report/cucumber_junit.xml ~/artifacts/report.xml
|
|
||||||
cp -r ~/project/screenshots ~/artifacts
|
|
||||||
ls -al
|
|
||||||
exit $TEST_RESULT
|
|
||||||
- store_test_results:
|
|
||||||
path: ~/test-results
|
|
||||||
- store_artifacts:
|
|
||||||
path: ~/artifacts
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
troubleshoot:
|
|
||||||
jobs:
|
|
||||||
- selenium_accept
|
|
|
@ -40,6 +40,7 @@
|
||||||
"eslint:circleci": "eslint",
|
"eslint:circleci": "eslint",
|
||||||
"eslint:fix": "eslint --fix '{src,cypress}/**/*.{ts,tsx}'",
|
"eslint:fix": "eslint --fix '{src,cypress}/**/*.{ts,tsx}'",
|
||||||
"prettier": "prettier --config .prettierrc.json --check '{src,cypress}/**/*.{ts,tsx}'",
|
"prettier": "prettier --config .prettierrc.json --check '{src,cypress}/**/*.{ts,tsx}'",
|
||||||
|
"prettier:circleci": "prettier --config .prettierrc.json --check",
|
||||||
"prettier:fix": "prettier --config .prettierrc.json --write '{src,cypress}/**/*.{ts,tsx}'",
|
"prettier:fix": "prettier --config .prettierrc.json --write '{src,cypress}/**/*.{ts,tsx}'",
|
||||||
"tsc": "tsc -p ./tsconfig.json --noEmit --pretty --skipLibCheck",
|
"tsc": "tsc -p ./tsconfig.json --noEmit --pretty --skipLibCheck",
|
||||||
"tsc:cypress": "tsc -p ./cypress/tsconfig.json --noEmit --pretty --skipLibCheck",
|
"tsc:cypress": "tsc -p ./cypress/tsconfig.json --noEmit --pretty --skipLibCheck",
|
||||||
|
|
Loading…
Reference in New Issue