mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Drone: Fix grafana-mixin linting (#28308)
* Drone: Fix Starlark script Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * grafana-mixin: Move build logic to scripts Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Drone: Use mixin scripts Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * CI build image: Install jsonnetfmt and mixtool Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com> * Makefile: Print commands Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
210
.drone.yml
210
.drone.yml
@@ -14,7 +14,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -27,19 +27,21 @@ steps:
|
|||||||
DOCKERIZE_VERSION: 0.6.1
|
DOCKERIZE_VERSION: 0.6.1
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -47,7 +49,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -62,7 +64,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -71,7 +73,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -80,7 +82,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise
|
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --variants linux-x64,linux-x64-musl,osx64,win64 --no-pull-enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -89,7 +91,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -97,7 +99,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps
|
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -105,7 +107,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64
|
- . scripts/build/gpg-test-vars.sh && ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --variants linux-x64,linux-x64-musl,osx64,win64
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -118,7 +120,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -136,14 +138,14 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: build-storybook
|
- name: build-storybook
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn storybook:build
|
- yarn storybook:build
|
||||||
depends_on:
|
depends_on:
|
||||||
- package
|
- package
|
||||||
|
|
||||||
- name: build-frontend-docs
|
- name: build-frontend-docs
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./scripts/ci-reference-docs-lint.sh ci
|
- ./scripts/ci-reference-docs-lint.sh ci
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -160,7 +162,7 @@ steps:
|
|||||||
- build-frontend-docs
|
- build-frontend-docs
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -176,7 +178,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -193,7 +195,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -270,7 +272,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -295,19 +297,21 @@ steps:
|
|||||||
from_secret: drone_token
|
from_secret: drone_token
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -315,7 +319,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -330,7 +334,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -339,7 +343,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -348,7 +352,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: publish-frontend-metrics
|
- name: publish-frontend-metrics
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
|
- ./scripts/ci-frontend-metrics.sh | ./bin/grabpl publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
|
||||||
environment:
|
environment:
|
||||||
@@ -359,7 +363,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
- ./bin/grabpl build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -368,7 +372,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
- ./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -376,7 +380,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
||||||
environment:
|
environment:
|
||||||
@@ -387,7 +391,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign
|
- ./bin/grabpl package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --no-pull-enterprise --sign
|
||||||
environment:
|
environment:
|
||||||
@@ -411,7 +415,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -429,7 +433,7 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: build-storybook
|
- name: build-storybook
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn storybook:build
|
- yarn storybook:build
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -448,7 +452,7 @@ steps:
|
|||||||
- build-storybook
|
- build-storybook
|
||||||
|
|
||||||
- name: build-frontend-docs
|
- name: build-frontend-docs
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./scripts/ci-reference-docs-lint.sh ci
|
- ./scripts/ci-reference-docs-lint.sh ci
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -465,7 +469,7 @@ steps:
|
|||||||
- build-frontend-docs
|
- build-frontend-docs
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -495,7 +499,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -512,7 +516,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -528,7 +532,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: release-next-npm-packages
|
- name: release-next-npm-packages
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./node_modules/.bin/lerna bootstrap
|
- ./node_modules/.bin/lerna bootstrap
|
||||||
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
||||||
@@ -648,7 +652,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -723,7 +727,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -738,19 +742,21 @@ steps:
|
|||||||
DOCKERIZE_VERSION: 0.6.1
|
DOCKERIZE_VERSION: 0.6.1
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -758,7 +764,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -773,7 +779,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -782,7 +788,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -791,7 +797,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise $${DRONE_TAG}
|
- ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise $${DRONE_TAG}
|
||||||
@@ -804,7 +810,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise $${DRONE_TAG}
|
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise $${DRONE_TAG}
|
||||||
@@ -813,7 +819,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
||||||
environment:
|
environment:
|
||||||
@@ -824,7 +830,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign $${DRONE_TAG}
|
- ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign $${DRONE_TAG}
|
||||||
@@ -849,7 +855,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -867,7 +873,7 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: build-storybook
|
- name: build-storybook
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn storybook:build
|
- yarn storybook:build
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -888,7 +894,7 @@ steps:
|
|||||||
- build-storybook
|
- build-storybook
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -918,7 +924,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -935,7 +941,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -951,7 +957,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: release-npm-packages
|
- name: release-npm-packages
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./node_modules/.bin/lerna bootstrap
|
- ./node_modules/.bin/lerna bootstrap
|
||||||
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
||||||
@@ -1072,7 +1078,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: clone
|
- name: clone
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -1086,7 +1092,7 @@ steps:
|
|||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- mv bin/grabpl /tmp/
|
- mv bin/grabpl /tmp/
|
||||||
@@ -1106,19 +1112,21 @@ steps:
|
|||||||
- clone
|
- clone
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -1126,7 +1134,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -1141,7 +1149,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -1150,7 +1158,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -1159,7 +1167,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise $${DRONE_TAG}
|
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise $${DRONE_TAG}
|
||||||
@@ -1172,7 +1180,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise $${DRONE_TAG}
|
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise $${DRONE_TAG}
|
||||||
@@ -1181,7 +1189,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin
|
- ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin
|
||||||
environment:
|
environment:
|
||||||
@@ -1192,7 +1200,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
- export DRONE_TAG=$$(./bin/grabpl parse-tag-ref ${DRONE_COMMIT_REF})
|
||||||
- ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign $${DRONE_TAG}
|
- ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign $${DRONE_TAG}
|
||||||
@@ -1217,7 +1225,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -1235,7 +1243,7 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -1265,7 +1273,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -1282,7 +1290,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -1425,7 +1433,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -1504,7 +1512,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -1518,19 +1526,21 @@ steps:
|
|||||||
DOCKERIZE_VERSION: 0.6.1
|
DOCKERIZE_VERSION: 0.6.1
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -1538,7 +1548,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -1553,7 +1563,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -1562,7 +1572,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -1571,7 +1581,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
- ./bin/grabpl build-backend --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
||||||
environment:
|
environment:
|
||||||
@@ -1583,7 +1593,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise v7.3.0-test
|
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition oss --no-pull-enterprise v7.3.0-test
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -1591,7 +1601,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
- ./bin/grabpl build-plugins --jobs 8 --edition oss --no-install-deps --sign --signing-admin
|
||||||
environment:
|
environment:
|
||||||
@@ -1602,7 +1612,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
- ./bin/grabpl package --jobs 8 --edition oss --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
||||||
environment:
|
environment:
|
||||||
@@ -1626,7 +1636,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -1644,7 +1654,7 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: build-storybook
|
- name: build-storybook
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn storybook:build
|
- yarn storybook:build
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -1661,7 +1671,7 @@ steps:
|
|||||||
- build-storybook
|
- build-storybook
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -1685,7 +1695,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -1702,7 +1712,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -1718,7 +1728,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: release-npm-packages
|
- name: release-npm-packages
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./node_modules/.bin/lerna bootstrap
|
- ./node_modules/.bin/lerna bootstrap
|
||||||
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
- echo "//registry.npmjs.org/:_authToken=$${NPM_TOKEN}" >> ~/.npmrc
|
||||||
@@ -1836,7 +1846,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: clone
|
- name: clone
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
@@ -1849,7 +1859,7 @@ steps:
|
|||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mv bin/grabpl /tmp/
|
- mv bin/grabpl /tmp/
|
||||||
- rmdir bin
|
- rmdir bin
|
||||||
@@ -1868,19 +1878,21 @@ steps:
|
|||||||
- clone
|
- clone
|
||||||
|
|
||||||
- name: lint-backend
|
- name: lint-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
- golangci-lint run --config scripts/go/configs/.golangci.toml ./pkg/...
|
||||||
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
- revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...
|
||||||
- ./scripts/revive-strict
|
- ./scripts/revive-strict
|
||||||
- ./scripts/tidy-check.sh
|
- ./scripts/tidy-check.sh
|
||||||
|
- ./grafana-mixin/scripts/lint.sh
|
||||||
|
- ./grafana-mixin/scripts/build.sh
|
||||||
environment:
|
environment:
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
depends_on:
|
depends_on:
|
||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: codespell
|
- name: codespell
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
- "echo -e \"unknwon\nreferer\nerrorstring\neror\niam\" > words_to_ignore.txt"
|
||||||
- codespell -I words_to_ignore.txt docs/
|
- codespell -I words_to_ignore.txt docs/
|
||||||
@@ -1888,7 +1900,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- curl -fLO http://storage.googleapis.com/grafana-downloads/ci-dependencies/shellcheck-v$${VERSION}.linux.x86_64.tar.xz
|
- 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
|
- echo $$CHKSUM shellcheck-v$${VERSION}.linux.x86_64.tar.xz | sha512sum --check --strict --status
|
||||||
@@ -1903,7 +1915,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: test-backend
|
- name: test-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl test-backend
|
- ./bin/grabpl test-backend
|
||||||
- ./bin/grabpl integration-tests
|
- ./bin/grabpl integration-tests
|
||||||
@@ -1912,7 +1924,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: test-frontend
|
- name: test-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- yarn run ci:test-frontend
|
- yarn run ci:test-frontend
|
||||||
environment:
|
environment:
|
||||||
@@ -1921,7 +1933,7 @@ steps:
|
|||||||
- initialize
|
- initialize
|
||||||
|
|
||||||
- name: build-backend
|
- name: build-backend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
- ./bin/grabpl build-backend --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise v7.3.0-test
|
||||||
environment:
|
environment:
|
||||||
@@ -1933,7 +1945,7 @@ steps:
|
|||||||
- test-backend
|
- test-backend
|
||||||
|
|
||||||
- name: build-frontend
|
- name: build-frontend
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise v7.3.0-test
|
- ./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps --edition enterprise --no-pull-enterprise v7.3.0-test
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -1941,7 +1953,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: build-plugins
|
- name: build-plugins
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin
|
- ./bin/grabpl build-plugins --jobs 8 --edition enterprise --no-install-deps --sign --signing-admin
|
||||||
environment:
|
environment:
|
||||||
@@ -1952,7 +1964,7 @@ steps:
|
|||||||
- lint-backend
|
- lint-backend
|
||||||
|
|
||||||
- name: package
|
- name: package
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
- ./bin/grabpl package --jobs 8 --edition enterprise --github-token $${GITHUB_TOKEN} --no-pull-enterprise --sign v7.3.0-test
|
||||||
environment:
|
environment:
|
||||||
@@ -1976,7 +1988,7 @@ steps:
|
|||||||
- shellcheck
|
- shellcheck
|
||||||
|
|
||||||
- name: end-to-end-tests-server
|
- name: end-to-end-tests-server
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
detach: true
|
detach: true
|
||||||
commands:
|
commands:
|
||||||
- ./e2e/start-server
|
- ./e2e/start-server
|
||||||
@@ -1994,7 +2006,7 @@ steps:
|
|||||||
- end-to-end-tests-server
|
- end-to-end-tests-server
|
||||||
|
|
||||||
- name: copy-packages-for-docker
|
- name: copy-packages-for-docker
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- cp dist/*.tar.gz* packaging/docker/
|
- cp dist/*.tar.gz* packaging/docker/
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -2018,7 +2030,7 @@ steps:
|
|||||||
- copy-packages-for-docker
|
- copy-packages-for-docker
|
||||||
|
|
||||||
- name: postgres-integration-tests
|
- name: postgres-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq postgresql-client
|
- apt-get install -yq postgresql-client
|
||||||
@@ -2035,7 +2047,7 @@ steps:
|
|||||||
- test-frontend
|
- test-frontend
|
||||||
|
|
||||||
- name: mysql-integration-tests
|
- name: mysql-integration-tests
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq default-mysql-client
|
- apt-get install -yq default-mysql-client
|
||||||
@@ -2176,7 +2188,7 @@ steps:
|
|||||||
- echo $DRONE_RUNNER_NAME
|
- echo $DRONE_RUNNER_NAME
|
||||||
|
|
||||||
- name: initialize
|
- name: initialize
|
||||||
image: grafana/build-container:1.2.27
|
image: grafana/build-container:1.2.28
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p bin
|
- mkdir -p bin
|
||||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v0.5.18/grabpl
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s
|
|
||||||
|
|
||||||
all: fmt lint build clean
|
all: fmt lint build clean
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
|
./scripts/format.sh
|
||||||
xargs -n 1 -- $(JSONNET_FMT) -i
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
|
./scripts/lint.sh
|
||||||
while read f; do \
|
|
||||||
$(JSONNET_FMT) "$$f" | diff -u "$$f" -; \
|
|
||||||
done
|
|
||||||
|
|
||||||
mixtool lint mixin.libsonnet
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
mixtool generate all mixin.libsonnet
|
./scripts/build.sh
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf dashboards_out alerts.yaml rules.yaml
|
rm -rf dashboards_out alerts.yaml rules.yaml
|
||||||
6
grafana-mixin/scripts/build.sh
Executable file
6
grafana-mixin/scripts/build.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
|
mixtool generate all mixin.libsonnet
|
||||||
1
grafana-mixin/scripts/common.sh
Normal file
1
grafana-mixin/scripts/common.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
JSONNET_FMT="jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s"
|
||||||
9
grafana-mixin/scripts/format.sh
Executable file
9
grafana-mixin/scripts/format.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
|
. scripts/common.sh
|
||||||
|
|
||||||
|
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
|
||||||
|
xargs -n 1 -- ${JSONNET_FMT} -i
|
||||||
13
grafana-mixin/scripts/lint.sh
Executable file
13
grafana-mixin/scripts/lint.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
|
. scripts/common.sh
|
||||||
|
|
||||||
|
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
|
||||||
|
while read f; do \
|
||||||
|
${JSONNET_FMT} "$f" | diff -u "$f" -; \
|
||||||
|
done
|
||||||
|
|
||||||
|
mixtool lint mixin.libsonnet
|
||||||
@@ -155,7 +155,11 @@ RUN cd /tmp && \
|
|||||||
tar xf x86_64-linux-musl-cross.tgz && \
|
tar xf x86_64-linux-musl-cross.tgz && \
|
||||||
rm x86_64-linux-musl-cross.tgz
|
rm x86_64-linux-musl-cross.tgz
|
||||||
|
|
||||||
RUN go get -u github.com/mgechev/revive@v1.0.2
|
RUN go get -u github.com/mgechev/revive@v1.0.2 && \
|
||||||
RUN mv ${GOPATH}/bin/revive /usr/local/bin/
|
mv ${GOPATH}/bin/revive /usr/local/bin/ && \
|
||||||
|
go get github.com/google/go-jsonnet/cmd/jsonnetfmt && \
|
||||||
|
mv ${GOPATH}/bin/jsonnetfmt /usr/local/bin/ && \
|
||||||
|
go get github.com/monitoring-mixins/mixtool/cmd/mixtool && \
|
||||||
|
mv ${GOPATH}/bin/mixtool /usr/local/bin/
|
||||||
|
|
||||||
COPY ./bootstrap.sh /tmp/bootstrap.sh
|
COPY ./bootstrap.sh /tmp/bootstrap.sh
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
_version="1.2.27"
|
_version="1.2.28"
|
||||||
_tag="grafana/build-container:${_version}"
|
_tag="grafana/build-container:${_version}"
|
||||||
|
|
||||||
_dpath=$(dirname "${BASH_SOURCE[0]}")
|
_dpath=$(dirname "${BASH_SOURCE[0]}")
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
grabpl_version = '0.5.18'
|
grabpl_version = '0.5.18'
|
||||||
build_image = 'grafana/build-container:1.2.27'
|
build_image = 'grafana/build-container:1.2.28'
|
||||||
publish_image = 'grafana/grafana-ci-deploy:1.2.6'
|
publish_image = 'grafana/grafana-ci-deploy:1.2.6'
|
||||||
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
|
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
|
||||||
alpine_image = 'alpine:3.12'
|
alpine_image = 'alpine:3.12'
|
||||||
@@ -224,7 +224,8 @@ def lint_backend_step(edition):
|
|||||||
'revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...',
|
'revive -formatter stylish -config scripts/go/configs/revive.toml ./pkg/...',
|
||||||
'./scripts/revive-strict',
|
'./scripts/revive-strict',
|
||||||
'./scripts/tidy-check.sh',
|
'./scripts/tidy-check.sh',
|
||||||
'./scripts/mixin-check.sh,
|
'./grafana-mixin/scripts/lint.sh',
|
||||||
|
'./grafana-mixin/scripts/build.sh',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user