2020-07-10 09:09:21 -05:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2020-07-13 09:43:56 -05:00
|
|
|
name: test-pr
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
2020-07-13 09:43:56 -05:00
|
|
|
- name: initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl
|
|
|
|
- chmod +x grabpl
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv grabpl bin
|
|
|
|
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- yarn install --frozen-lockfile --no-progress
|
|
|
|
- cp -r $(yarn cache dir) yarn-cache
|
|
|
|
environment:
|
|
|
|
DOCKERIZE_VERSION: 0.6.1
|
2020-07-13 09:43:56 -05:00
|
|
|
GRABPL_VERSION: 0.4.24
|
2020-07-10 09:09:21 -05:00
|
|
|
|
2020-07-13 09:43:56 -05:00
|
|
|
- name: lint-backend
|
2020-07-10 09:09:21 -05:00
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- make lint-go
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 1
|
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: codespell
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
|
|
|
- codespell -I words_to_ignore.txt docs/
|
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: shellcheck
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
|
|
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
|
|
|
- tar xf shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
|
|
|
- mv shellcheck-v$${VERSION}/shellcheck /usr/local/bin/
|
|
|
|
- rm -rf shellcheck-v$${VERSION}*
|
|
|
|
- ./bin/grabpl shellcheck
|
|
|
|
environment:
|
|
|
|
CHKSUM: beca3d7819a6bdcfbd044576df4fc284053b48f468b2f03428fe66f4ceb2c05d9b5411357fa15003cb0311406c255084cf7283a3b8fce644c340c2f6aa910b9f
|
|
|
|
VERSION: 0.7.1
|
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: build-backend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
2020-07-17 06:52:09 -05:00
|
|
|
- ./bin/grabpl build-backend --edition oss --build-id $DRONE_BUILD_NUMBER --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
|
|
|
- lint-backend
|
2020-07-10 09:09:21 -05:00
|
|
|
- test-backend
|
|
|
|
|
|
|
|
- name: build-frontend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
2020-07-17 06:52:09 -05:00
|
|
|
- ./bin/grabpl build-frontend --no-install-deps --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
- test-frontend
|
|
|
|
|
|
|
|
- name: test-backend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- go test -covermode=atomic ./pkg/...
|
|
|
|
- ./bin/grabpl integration-tests
|
|
|
|
- cp -r $(go env GOCACHE) go-cache
|
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
|
|
|
- lint-backend
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: test-frontend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- yarn run prettier:check
|
|
|
|
- yarn run packages:typecheck
|
|
|
|
- yarn run typecheck
|
|
|
|
- yarn run test
|
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: build-plugins
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
2020-07-17 06:52:09 -05:00
|
|
|
- ./bin/grabpl build-plugins --edition oss --no-install-deps
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2020-07-13 09:43:56 -05:00
|
|
|
- initialize
|
|
|
|
- lint-backend
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: package
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
2020-07-17 06:52:09 -05:00
|
|
|
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
|
|
|
- build-plugins
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
- codespell
|
|
|
|
- shellcheck
|
|
|
|
|
|
|
|
- name: end-to-end-tests-server
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
detach: true
|
|
|
|
commands:
|
|
|
|
- ./e2e/start-server
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: end-to-end-tests
|
|
|
|
image: grafana/ci-e2e:12.18-1
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- ./node_modules/.bin/cypress install
|
|
|
|
- ./e2e/wait-for-grafana
|
|
|
|
- ./e2e/run-suite
|
|
|
|
environment:
|
|
|
|
HOST: end-to-end-tests-server
|
|
|
|
depends_on:
|
|
|
|
- end-to-end-tests-server
|
|
|
|
|
2020-07-16 02:25:07 -05:00
|
|
|
- name: build-storybook
|
2020-07-10 09:09:21 -05:00
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- yarn storybook:build
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: build-docs-website
|
|
|
|
image: grafana/docs-base:latest
|
|
|
|
commands:
|
|
|
|
- mkdir -p /hugo/content/docs/grafana
|
|
|
|
- cp -r docs/sources /hugo/content/docs/grafana/latest
|
|
|
|
- cd /hugo && make prod
|
2020-07-14 06:31:26 -05:00
|
|
|
depends_on:
|
|
|
|
- initialize
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
- name: copy-packages-for-docker
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- cp dist/*.tar.gz packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: build-docker-images
|
|
|
|
image: grafana/drone-grafana-docker:0.2.0
|
|
|
|
settings:
|
|
|
|
archs: amd64
|
|
|
|
dry_run: true
|
|
|
|
edition: oss
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
|
2020-07-17 06:52:09 -05:00
|
|
|
- name: postgres-integration-tests
|
2020-07-10 09:09:21 -05:00
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
|
|
|
- go clean -testcache
|
|
|
|
- ./bin/grabpl integration-tests --database postgres
|
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
|
|
|
depends_on:
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
|
2020-07-17 06:52:09 -05:00
|
|
|
- name: mysql-integration-tests
|
2020-07-10 09:09:21 -05:00
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
|
|
|
- go clean -testcache
|
|
|
|
- ./bin/grabpl integration-tests --database mysql
|
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
|
|
|
depends_on:
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: postgres
|
|
|
|
image: postgres:12.3-alpine
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: grafanatest
|
|
|
|
POSTGRES_PASSWORD: grafanatest
|
|
|
|
POSTGRES_USER: grafanatest
|
|
|
|
|
|
|
|
- name: mysql
|
|
|
|
image: mysql:5.6.48
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: grafana_tests
|
|
|
|
MYSQL_PASSWORD: password
|
|
|
|
MYSQL_ROOT_PASSWORD: rootpass
|
|
|
|
MYSQL_USER: grafana
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
2020-07-17 06:52:09 -05:00
|
|
|
repo:
|
|
|
|
- grafana/grafana
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: test-master
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: initialize
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v$${GRABPL_VERSION}/grabpl
|
|
|
|
- chmod +x grabpl
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv grabpl bin
|
|
|
|
- curl -fLO https://github.com/jwilder/dockerize/releases/download/v$${DOCKERIZE_VERSION}/dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- tar -C bin -xzvf dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- rm dockerize-linux-amd64-v$${DOCKERIZE_VERSION}.tar.gz
|
|
|
|
- yarn install --frozen-lockfile --no-progress
|
|
|
|
- cp -r $(yarn cache dir) yarn-cache
|
|
|
|
environment:
|
|
|
|
DOCKERIZE_VERSION: 0.6.1
|
|
|
|
GRABPL_VERSION: 0.4.24
|
|
|
|
|
|
|
|
- name: lint-backend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- make lint-go
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 1
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
|
|
|
|
- name: codespell
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
|
|
|
- codespell -I words_to_ignore.txt docs/
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
|
|
|
|
- name: shellcheck
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
|
|
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
|
|
|
- tar xf shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
|
|
|
- mv shellcheck-v$${VERSION}/shellcheck /usr/local/bin/
|
|
|
|
- rm -rf shellcheck-v$${VERSION}*
|
|
|
|
- ./bin/grabpl shellcheck
|
|
|
|
environment:
|
|
|
|
CHKSUM: beca3d7819a6bdcfbd044576df4fc284053b48f468b2f03428fe66f4ceb2c05d9b5411357fa15003cb0311406c255084cf7283a3b8fce644c340c2f6aa910b9f
|
|
|
|
VERSION: 0.7.1
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
|
|
|
|
- name: build-backend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
|
|
|
- ./bin/grabpl build-backend --edition oss --build-id $DRONE_BUILD_NUMBER
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
- lint-backend
|
|
|
|
- test-backend
|
|
|
|
|
|
|
|
- name: build-frontend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- ./bin/grabpl build-frontend --no-install-deps --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
- test-frontend
|
|
|
|
|
|
|
|
- name: test-backend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- go test -covermode=atomic ./pkg/...
|
|
|
|
- ./bin/grabpl integration-tests
|
|
|
|
- cp -r $(go env GOCACHE) go-cache
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
- lint-backend
|
|
|
|
|
|
|
|
- name: test-frontend
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- yarn run prettier:check
|
|
|
|
- yarn run packages:typecheck
|
|
|
|
- yarn run typecheck
|
|
|
|
- yarn run test
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
|
|
|
|
- name: build-plugins
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- ./bin/grabpl build-plugins --edition oss --no-install-deps
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
- lint-backend
|
|
|
|
|
|
|
|
- name: package
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --edition oss --build-id $DRONE_BUILD_NUMBER --no-pull-enterprise
|
|
|
|
depends_on:
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
|
|
|
- build-plugins
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
- codespell
|
|
|
|
- shellcheck
|
|
|
|
|
|
|
|
- name: end-to-end-tests-server
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
detach: true
|
|
|
|
commands:
|
|
|
|
- ./e2e/start-server
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: end-to-end-tests
|
|
|
|
image: grafana/ci-e2e:12.18-1
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- ./node_modules/.bin/cypress install
|
|
|
|
- ./e2e/wait-for-grafana
|
|
|
|
- ./e2e/run-suite
|
|
|
|
environment:
|
|
|
|
HOST: end-to-end-tests-server
|
|
|
|
depends_on:
|
|
|
|
- end-to-end-tests-server
|
|
|
|
|
|
|
|
- name: build-storybook
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- rm -rf $(yarn cache dir) && cp -r yarn-cache $(yarn cache dir)
|
|
|
|
- yarn storybook:build
|
2020-07-17 08:30:43 -05:00
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: publish-storybook
|
|
|
|
image: grafana/grafana-ci-deploy:1.2.5
|
|
|
|
commands:
|
2020-07-18 07:38:23 -05:00
|
|
|
- echo "$${GCP_KEY}" > /tmp/gcpkey.json
|
2020-07-17 06:52:09 -05:00
|
|
|
- gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
|
2020-07-17 08:30:43 -05:00
|
|
|
- echo gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/canary
|
2020-07-17 06:52:09 -05:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
depends_on:
|
2020-07-17 08:30:43 -05:00
|
|
|
- build-storybook
|
2020-07-17 06:52:09 -05:00
|
|
|
|
|
|
|
- name: build-docs-website
|
|
|
|
image: grafana/docs-base:latest
|
|
|
|
commands:
|
|
|
|
- mkdir -p /hugo/content/docs/grafana
|
|
|
|
- cp -r docs/sources /hugo/content/docs/grafana/latest
|
|
|
|
- cd /hugo && make prod
|
|
|
|
depends_on:
|
|
|
|
- initialize
|
|
|
|
|
|
|
|
- name: copy-packages-for-docker
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- cp dist/*.tar.gz packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: build-docker-images
|
|
|
|
image: grafana/drone-grafana-docker:0.2.0
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
edition: oss
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
|
|
|
|
- name: build-docker-images-ubuntu
|
|
|
|
image: grafana/drone-grafana-docker:0.2.0
|
|
|
|
settings:
|
|
|
|
dry_run: true
|
|
|
|
edition: oss
|
|
|
|
ubuntu: true
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
|
|
|
|
- name: postgres-integration-tests
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
|
|
|
- go clean -testcache
|
|
|
|
- ./bin/grabpl integration-tests --database postgres
|
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
|
|
|
depends_on:
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
|
|
|
|
- name: mysql-integration-tests
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
|
|
|
|
- rm -rf $(go env GOCACHE) && cp -r go-cache $(go env GOCACHE)
|
|
|
|
- go clean -testcache
|
|
|
|
- ./bin/grabpl integration-tests --database mysql
|
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
|
|
|
depends_on:
|
|
|
|
- test-backend
|
|
|
|
- test-frontend
|
|
|
|
|
|
|
|
- name: build-windows-installer
|
|
|
|
image: grafana/wix-toolset-ci:v3
|
|
|
|
commands:
|
|
|
|
- echo ./scripts/build/ci-msi-build/ci-msi-build-oss.sh
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
|
|
|
|
- name: release-next-npm-packages
|
|
|
|
image: grafana/build-container:1.2.21
|
|
|
|
commands:
|
|
|
|
- npx lerna bootstrap
|
2020-07-17 10:47:07 -05:00
|
|
|
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
2020-07-17 06:52:09 -05:00
|
|
|
- echo ./scripts/circle-release-next-packages.sh
|
|
|
|
environment:
|
|
|
|
NPM_TOKEN:
|
|
|
|
from_secret: npm_token
|
|
|
|
depends_on:
|
|
|
|
- end-to-end-tests
|
|
|
|
|
|
|
|
- name: publish-packages
|
|
|
|
image: grafana/grafana-ci-deploy:1.2.5
|
|
|
|
commands:
|
|
|
|
- echo ./bin/grabpl publish-packages --edition oss
|
|
|
|
depends_on:
|
|
|
|
- package
|
|
|
|
- end-to-end-tests
|
|
|
|
- mysql-integration-tests
|
|
|
|
- postgres-integration-tests
|
|
|
|
|
|
|
|
services:
|
|
|
|
- name: postgres
|
|
|
|
image: postgres:12.3-alpine
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: grafanatest
|
|
|
|
POSTGRES_PASSWORD: grafanatest
|
|
|
|
POSTGRES_USER: grafanatest
|
|
|
|
|
|
|
|
- name: mysql
|
|
|
|
image: mysql:5.6.48
|
|
|
|
environment:
|
|
|
|
MYSQL_DATABASE: grafana_tests
|
|
|
|
MYSQL_PASSWORD: password
|
|
|
|
MYSQL_ROOT_PASSWORD: rootpass
|
|
|
|
MYSQL_USER: grafana
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
repo:
|
|
|
|
- grafana/grafana
|
2020-07-10 09:09:21 -05:00
|
|
|
|
|
|
|
...
|