2020-07-10 09:09:21 -05:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-10-14 09:02:45 -05:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2020-07-10 09:09:21 -05:00
kind : pipeline
2022-07-08 04:18:46 -05:00
name : pr-verify-drone
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-07-08 04:18:46 -05:00
name : identify-runner
- commands :
2022-09-14 09:07:09 -05:00
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-14 09:07:09 -05:00
name : compile-build-cmd
- commands :
- ./bin/build verify-drone
2022-07-08 04:18:46 -05:00
depends_on :
2022-09-14 09:45:00 -05:00
- compile-build-cmd
2022-07-08 04:18:46 -05:00
image : byrnedo/alpine-curl:0.1.8
name : lint-drone
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
- '*.md'
include :
- scripts/drone/**
- .drone.yml
- .drone.star
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2022-07-08 04:18:46 -05:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-07-08 04:18:46 -05:00
kind : pipeline
2023-01-30 03:27:11 -06:00
name : pr-verify-starlark
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-01-30 03:27:11 -06:00
name : identify-runner
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-01-30 03:27:11 -06:00
name : compile-build-cmd
- commands :
2023-09-12 10:19:06 -05:00
- go install github.com/bazelbuild/buildtools/buildifier@latest
- buildifier --lint=warn -mode=check -r .
2023-01-30 03:27:11 -06:00
depends_on :
- compile-build-cmd
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-01-30 03:27:11 -06:00
name : lint-starlark
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
- '*.md'
include :
- scripts/drone/**
- .drone.star
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2022-04-28 04:04:03 -05:00
name : pr-test-frontend
2021-10-14 09:02:45 -05:00
node :
type : no -parallel
2020-07-10 09:09:21 -05:00
platform :
arch : amd64
2021-10-14 09:02:45 -05:00
os : linux
2021-11-17 03:25:55 -06:00
services : [ ]
2020-07-10 09:09:21 -05:00
steps :
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
- commands :
2021-10-08 09:19:10 -05:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2022-06-29 09:04:52 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update git bash
2022-06-29 09:04:52 -05:00
- yarn betterer ci
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-06-29 09:04:52 -05:00
name : betterer-frontend
2023-02-01 10:55:49 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-02-01 10:55:49 -06:00
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-02-01 10:55:49 -06:00
name : clone-enterprise
2022-04-28 04:04:03 -05:00
- commands :
- yarn run ci:test-frontend
depends_on :
- yarn-install
environment :
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-28 04:04:03 -05:00
name : test-frontend
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
2022-06-01 03:47:50 -05:00
- '*.md'
- pkg/**
- packaging/**
- go.sum
- go.mod
include : [ ]
2022-04-28 04:04:03 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2022-04-28 04:04:03 -05:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-04-28 04:04:03 -05:00
kind : pipeline
2022-09-21 14:39:28 -05:00
name : pr-lint-frontend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2023-02-01 10:55:49 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-02-01 10:55:49 -06:00
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-02-01 10:55:49 -06:00
name : clone-enterprise
2022-09-21 14:39:28 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-09-21 14:39:28 -05:00
name : identify-runner
- commands :
- yarn install --immutable
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-09-21 14:39:28 -05:00
name : yarn-install
- commands :
- yarn run prettier:check
- yarn run lint
- yarn run typecheck
depends_on :
- yarn-install
environment :
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-09-21 14:39:28 -05:00
name : lint-frontend
2023-06-06 02:29:04 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update git
2023-06-06 02:29:04 -05:00
- |-
yarn run i18n:extract || (echo "
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
- "\n file_diff=$(git diff --dirstat public/locales)\n if
[ -n \"$file_diff\" ]; then\n echo $file_diff\n echo
\"\nTranslation extraction has not been committed. Please run 'yarn i18n:extract',
commit the changes and push again.\"\n exit 1\n fi\n
\ "
- yarn run i18n:compile
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-06-06 02:29:04 -05:00
name : verify-i18n
2022-09-21 14:39:28 -05:00
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
- '*.md'
- pkg/**
- packaging/**
- go.sum
- go.mod
include : [ ]
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
2022-10-10 10:46:56 -05:00
environment :
EDITION : oss
2022-09-21 14:39:28 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2022-04-28 04:04:03 -05:00
name : pr-test-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2023-02-01 10:55:49 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-02-01 10:55:49 -06:00
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-02-01 10:55:49 -06:00
name : clone-enterprise
2022-04-28 04:04:03 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-28 04:04:03 -05:00
name : identify-runner
2022-06-09 01:48:27 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-09 01:48:27 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-09 01:48:27 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2022-04-28 04:04:03 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-04-28 04:04:03 -05:00
- make gen-go
2022-06-09 01:48:27 -05:00
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-04-28 04:04:03 -05:00
name : wire-install
2021-10-14 09:02:45 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base shared-mime-info shared-mime-info-lang
2023-01-31 11:43:07 -06:00
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
2021-10-11 04:23:55 -05:00
depends_on :
2022-04-14 06:56:14 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-10-14 09:02:45 -05:00
name : test-backend
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-04-17 11:33:43 -05:00
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-08-24 10:07:06 -05:00
depends_on :
2022-04-14 06:56:14 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-10-14 09:02:45 -05:00
name : test-backend-integration
2021-11-17 03:25:55 -06:00
trigger :
event :
- pull_request
2022-02-21 05:55:16 -06:00
paths :
exclude :
- docs/**
2022-06-01 03:47:50 -05:00
- '*.md'
include :
- pkg/**
- packaging/**
- .drone.yml
- conf/**
- go.sum
- go.mod
2022-06-14 04:22:52 -05:00
- public/app/plugins/**/plugin.json
2023-11-17 02:21:35 -06:00
- docs/sources/setup-grafana/configure-grafana/feature-toggles/**
2022-08-24 06:54:11 -05:00
- devenv/**
2021-11-17 03:25:55 -06:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2021-11-17 03:25:55 -06:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-11-17 03:25:55 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2021-11-17 03:25:55 -06:00
kind : pipeline
2022-09-21 06:05:19 -05:00
name : pr-lint-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-09-21 06:05:19 -05:00
name : identify-runner
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : compile-build-cmd
2023-02-01 10:55:49 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-02-01 10:55:49 -06:00
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-02-01 10:55:49 -06:00
name : clone-enterprise
2022-09-21 06:05:19 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-09-21 06:05:19 -05:00
- make gen-go
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : wire-install
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make build-base
2022-09-21 06:05:19 -05:00
- make lint-go
depends_on :
- wire-install
environment :
CGO_ENABLED : "1"
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : lint-backend
2023-05-31 15:57:45 -05:00
- commands :
- go run scripts/modowners/modowners.go check go.mod
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-31 15:57:45 -05:00
name : validate-modfile
2023-09-20 10:46:15 -05:00
- commands :
- apk add --update make
2023-09-25 14:34:57 -05:00
- make swagger-validate
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-09-20 10:46:15 -05:00
name : validate-openapi-spec
2022-09-21 06:05:19 -05:00
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
- '*.md'
include :
- pkg/**
- packaging/**
2023-05-12 03:18:59 -05:00
- .drone.yml
2022-09-21 06:05:19 -05:00
- conf/**
- go.sum
- go.mod
- public/app/plugins/**/plugin.json
- devenv/**
2022-12-15 05:48:00 -06:00
- .bingo/**
2022-09-21 06:05:19 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 06:05:19 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2021-11-17 03:25:55 -06:00
name : pr-build-e2e
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
2021-10-21 15:28:57 -05:00
- commands :
2021-11-17 03:25:55 -06:00
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2021-11-17 03:25:55 -06:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
2022-07-28 09:11:22 -05:00
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2022-08-01 05:56:06 -05:00
depends_on : [ ]
2022-07-28 09:11:22 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-07-28 09:11:22 -05:00
name : compile-build-cmd
2022-06-09 01:48:27 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-09 01:48:27 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2022-06-22 08:22:42 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-09 01:48:27 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2021-11-17 03:25:55 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2021-11-17 03:25:55 -06:00
- make gen-go
2022-06-09 01:48:27 -05:00
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-04-14 06:56:14 -05:00
name : wire-install
- commands :
2021-11-17 03:25:55 -06:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2023-09-18 16:53:42 -05:00
- commands :
- apk add --update jq bash
- yarn packages:build
- yarn packages:pack
- ./scripts/validate-npm-packages.sh
depends_on :
- yarn-install
environment :
NODE_OPTIONS : --max_old_space_size=8192
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-09-18 16:53:42 -05:00
name : build-frontend-packages
2022-05-16 07:28:37 -05:00
- failure : ignore
image : grafana/drone-downstream
name : trigger-enterprise-downstream
settings :
params :
- SOURCE_BUILD_NUMBER=${DRONE_COMMIT}
- SOURCE_COMMIT=${DRONE_COMMIT}
- OSS_PULL_REQUEST=${DRONE_PULL_REQUEST}
repositories :
- grafana/grafana-enterprise@${DRONE_SOURCE_BRANCH}
server : https://drone.grafana.net
token :
from_secret : drone_token
2021-10-14 09:02:45 -05:00
- commands :
2023-10-31 15:52:09 -05:00
- /src/grafana-build artifacts -a targz:grafana:linux/amd64 -a targz:grafana:linux/arm64
2023-12-15 08:56:22 -06:00
-a targz:grafana:linux/arm/v7 --go-version=1.21.5 --yarn-cache=$$YARN_CACHE_FOLDER
--build-id=$$DRONE_BUILD_NUMBER --grafana-dir=$$PWD > packages.txt
2020-07-10 09:09:21 -05:00
depends_on :
2022-04-14 06:56:14 -05:00
- yarn-install
2023-09-12 10:19:06 -05:00
image : grafana/grafana-build:main
name : rgm-package
2023-09-12 12:59:02 -05:00
pull : always
2023-09-12 10:19:06 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2021-10-14 09:02:45 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update tar bash
- mkdir grafana
- tar --strip-components=1 -xvf ./dist/*amd64.tar.gz -C grafana
- cp -r devenv scripts tools grafana && cd grafana && ./scripts/grafana-server/start-server
2020-07-10 09:09:21 -05:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-package
2021-10-14 09:02:45 -05:00
detach : true
environment :
2023-09-12 10:19:06 -05:00
GF_APP_MODE : development
GF_SERVER_HTTP_PORT : "3001"
GF_SERVER_ROUTER_LOGGING : "1"
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-01-20 11:01:00 -06:00
name : grafana-server
2021-10-14 09:02:45 -05:00
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
2020-07-10 09:09:21 -05:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-10-14 09:02:45 -05:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-dashboards-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-smoke-tests-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite panels-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-panels-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite various-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-various-suite
2022-11-08 04:27:54 -06:00
- commands :
- cd /
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
depends_on :
- grafana-server
environment :
AZURE_SP_APP_ID :
from_secret : azure_sp_app_id
AZURE_SP_PASSWORD :
from_secret : azure_sp_app_pw
AZURE_TENANT :
from_secret : azure_tenant
CYPRESS_CI : "true"
GITHUB_TOKEN :
2023-09-07 11:26:43 -05:00
from_secret : github_token
2022-11-08 04:27:54 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:3.0.0
2022-11-08 04:27:54 -06:00
name : end-to-end-tests-cloud-plugins-suite-azure
when :
paths :
include :
- pkg/tsdb/azuremonitor/**
2023-02-03 10:06:54 -06:00
- public/app/plugins/datasource/azuremonitor/**
2022-12-21 10:42:24 -06:00
- e2e/cloud-plugins-suite/azure-monitor.spec.ts
2022-11-08 04:27:54 -06:00
repo :
- grafana/grafana
2021-12-24 03:43:32 -06:00
- commands :
- apt-get update
- apt-get install -yq zip
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
- gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json
- find ./e2e -type f -name "*spec.ts.mp4" | zip e2e/videos.zip -@
- gsutil cp e2e/videos.zip gs://$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
- export E2E_ARTIFACTS_VIDEO_ZIP=https://storage.googleapis.com/$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
- 'echo "E2E Test artifacts uploaded to: $${E2E_ARTIFACTS_VIDEO_ZIP}"'
- 'curl -X POST https://api.github.com/repos/${DRONE_REPO}/statuses/${DRONE_COMMIT_SHA}
-H "Authorization: token $${GITHUB_TOKEN}" -d "{\"state\":\"success\",\"target_url\":\"$${E2E_ARTIFACTS_VIDEO_ZIP}\",
\"description\": \"Click on the details to download e2e recording videos\", \"context\":
\"e2e_artifacts\"}"'
depends_on :
- end-to-end-tests-dashboards-suite
- end-to-end-tests-panels-suite
- end-to-end-tests-smoke-tests-suite
- end-to-end-tests-various-suite
environment :
E2E_TEST_ARTIFACTS_BUCKET : releng-pipeline-artifacts-dev
GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY :
from_secret : gcp_upload_artifacts_key
GITHUB_TOKEN :
from_secret : github_token
2022-10-20 07:18:33 -05:00
failure : ignore
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2022-01-12 09:58:35 -06:00
name : e2e-tests-artifacts-upload
when :
status :
- success
- failure
2021-10-14 09:02:45 -05:00
- commands :
2020-07-10 09:09:21 -05:00
- yarn storybook:build
2022-12-07 01:56:15 -06:00
- ./bin/build verify-storybook
2020-07-10 09:09:21 -05:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-package
2022-03-02 05:02:07 -06:00
- build-frontend-packages
2021-10-14 09:02:45 -05:00
environment :
NODE_OPTIONS : --max_old_space_size=4096
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2021-10-14 09:02:45 -05:00
name : build-storybook
2022-09-07 07:08:13 -05:00
when :
paths :
include :
- packages/grafana-ui/**
2021-10-14 09:02:45 -05:00
- commands :
2023-10-31 09:11:54 -05:00
- npx wait-on@7.0.1 http://$HOST:$PORT
2021-11-15 01:49:39 -06:00
- pa11y-ci --config .pa11yci-pr.conf.js
2021-10-14 09:02:45 -05:00
depends_on :
2022-01-20 11:01:00 -06:00
- grafana-server
2021-09-14 06:23:17 -05:00
environment :
GRAFANA_MISC_STATS_API_KEY :
from_secret : grafana_misc_stats_api_key
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2021-09-14 06:23:17 -05:00
PORT : 3001
2021-11-16 23:03:09 -06:00
failure : always
2022-07-28 11:49:41 -05:00
image : grafana/docker-puppeteer:1.1.0
2021-11-10 06:35:03 -06:00
name : test-a11y-frontend
2022-02-07 11:30:41 -06:00
- commands :
2023-09-12 12:59:02 -05:00
- docker run --privileged --rm tonistiigi/binfmt --install all
2023-10-31 15:52:09 -05:00
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
2023-12-20 07:55:23 -06:00
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
--ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.18.4 --tag-format='{{ .version_base
}}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{ .version_base
}}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
2023-09-12 10:19:06 -05:00
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
2023-05-17 10:57:37 -05:00
depends_on :
2023-10-31 15:52:09 -05:00
- yarn-install
2023-09-12 10:19:06 -05:00
image : grafana/grafana-build:main
name : rgm-build-docker
2023-09-12 12:59:02 -05:00
pull : always
2023-05-17 10:57:37 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
- commands :
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-build-docker
2023-05-17 10:57:37 -05:00
environment :
DOCKER_PASSWORD :
2023-09-07 11:26:43 -05:00
from_secret : docker_password
2023-05-17 10:57:37 -05:00
DOCKER_USER :
2023-09-07 11:26:43 -05:00
from_secret : docker_username
2023-05-17 10:57:37 -05:00
GITHUB_APP_ID :
from_secret : delivery-bot-app-id
GITHUB_APP_INSTALLATION_ID :
from_secret : delivery-bot-app-installation-id
GITHUB_APP_PRIVATE_KEY :
from_secret : delivery-bot-app-private-key
2023-05-22 04:37:13 -05:00
failure : ignore
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2023-05-17 10:57:37 -05:00
name : publish-images-grafana
volumes :
- name : docker
path : /var/run/docker.sock
2020-07-10 09:09:21 -05:00
trigger :
event :
- pull_request
2022-02-21 05:55:16 -06:00
paths :
exclude :
2022-04-28 09:41:46 -05:00
- '*.md'
2022-02-21 05:55:16 -06:00
- docs/**
2022-04-28 09:41:46 -05:00
- latest.json
2021-10-14 09:02:45 -05:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2020-09-24 08:20:48 -05:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-10-14 09:02:45 -05:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2020-09-24 08:20:48 -05:00
kind : pipeline
2021-11-17 03:25:55 -06:00
name : pr-integration-tests
node :
type : no -parallel
platform :
arch : amd64
os : linux
services :
- environment :
2021-12-15 06:48:59 -06:00
PGDATA : /var/lib/postgresql/data/pgdata
2021-11-17 03:25:55 -06:00
POSTGRES_DB : grafanatest
POSTGRES_PASSWORD : grafanatest
POSTGRES_USER : grafanatest
image : postgres:12.3-alpine
name : postgres
2021-12-15 06:48:59 -06:00
volumes :
- name : postgres
path : /var/lib/postgresql/data/pgdata
2023-06-14 18:00:45 -05:00
- commands :
- docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment :
2021-11-17 03:25:55 -06:00
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
2022-09-08 02:03:02 -05:00
image : mysql:5.7.39
2023-05-04 12:42:48 -05:00
name : mysql57
2021-12-15 06:48:59 -06:00
volumes :
2023-05-04 12:42:48 -05:00
- name : mysql57
path : /var/lib/mysql
- commands :
- docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password
environment :
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:8.0.32
name : mysql80
volumes :
- name : mysql80
2021-12-15 06:48:59 -06:00
path : /var/lib/mysql
2023-10-05 13:09:26 -05:00
- commands :
- /bin/mimir -target=backend
environment : {}
2023-11-23 10:59:36 -06:00
image : us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-10-17 05:21:45 -05:00
name : mimir_backend
2023-04-05 03:55:55 -05:00
- environment : {}
image : redis:6.2.11-alpine
name : redis
- environment : {}
image : memcached:1.6.9-alpine
name : memcached
2021-11-17 03:25:55 -06:00
steps :
2023-02-01 10:55:49 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-02-01 10:55:49 -06:00
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-02-01 10:55:49 -06:00
name : clone-enterprise
2021-11-17 03:25:55 -06:00
- commands :
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2021-11-17 03:25:55 -06:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
2022-07-28 09:11:22 -05:00
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2022-08-01 05:56:06 -05:00
depends_on : [ ]
2022-07-28 09:11:22 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-07-28 09:11:22 -05:00
name : compile-build-cmd
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
2022-06-16 09:41:56 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-16 09:41:56 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-16 09:41:56 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2022-06-16 09:41:56 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-16 09:41:56 -05:00
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-16 09:41:56 -05:00
name : wire-install
2021-11-17 03:25:55 -06:00
- commands :
- dockerize -wait tcp://postgres:5432 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-postgres
- commands :
- apk add --update build-base
- apk add --update postgresql-client
2021-11-17 03:25:55 -06:00
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-11-17 03:25:55 -06:00
depends_on :
2022-06-16 09:41:56 -05:00
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-postgres
2021-11-17 03:25:55 -06:00
environment :
GRAFANA_TEST_DB : postgres
PGPASSWORD : grafanatest
POSTGRES_HOST : postgres
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-11-17 03:25:55 -06:00
name : postgres-integration-tests
- commands :
2023-05-04 12:42:48 -05:00
- dockerize -wait tcp://mysql57:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-5.7
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
2021-11-17 03:25:55 -06:00
-prootpass
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-11-17 03:25:55 -06:00
depends_on :
2022-06-16 09:41:56 -05:00
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-5.7
2021-11-17 03:25:55 -06:00
environment :
GRAFANA_TEST_DB : mysql
2023-05-04 12:42:48 -05:00
MYSQL_HOST : mysql57
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-5.7-integration-tests
- commands :
- dockerize -wait tcp://mysql80:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-8.0
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-8.0
2023-05-04 12:42:48 -05:00
environment :
GRAFANA_TEST_DB : mysql
MYSQL_HOST : mysql80
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-8.0-integration-tests
2023-04-05 03:55:55 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- dockerize -wait tcp://redis:6379 -timeout 120s
image : jwilder/dockerize:0.6.1
name : wait-for-redis
- commands :
- apk add --update build-base
2023-04-05 03:55:55 -05:00
- go clean -testcache
- go test -run IntegrationRedis -covermode=atomic -timeout=2m ./pkg/...
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-redis
2023-04-05 03:55:55 -05:00
environment :
REDIS_URL : redis://redis:6379/0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-05 03:55:55 -05:00
name : redis-integration-tests
- commands :
- dockerize -wait tcp://memcached:11211 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-memcached
- commands :
- apk add --update build-base
2023-04-05 03:55:55 -05:00
- go clean -testcache
- go test -run IntegrationMemcached -covermode=atomic -timeout=2m ./pkg/...
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-memcached
2023-04-05 03:55:55 -05:00
environment :
MEMCACHED_HOSTS : memcached:11211
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-05 03:55:55 -05:00
name : memcached-integration-tests
2023-10-05 13:09:26 -05:00
- commands :
2023-10-17 05:21:45 -05:00
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
2023-10-05 13:09:26 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-remote-alertmanager
- commands :
- apk add --update build-base
- go clean -testcache
2023-11-22 12:13:04 -06:00
- go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/...
2023-10-05 13:09:26 -05:00
depends_on :
- wire-install
- wait-for-remote-alertmanager
2023-10-17 05:21:45 -05:00
environment :
AM_TENANT_ID : test
AM_URL : http://mimir_backend:8080
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-05 13:09:26 -05:00
name : remote-alertmanager-integration-tests
2021-11-17 03:25:55 -06:00
trigger :
event :
- pull_request
2022-02-21 05:55:16 -06:00
paths :
exclude :
- docs/**
2022-08-01 04:36:32 -05:00
- '*.md'
include :
- pkg/**
- packaging/**
- .drone.yml
- conf/**
- go.sum
- go.mod
- public/app/plugins/**/plugin.json
2021-11-17 03:25:55 -06:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2021-12-15 06:48:59 -06:00
- name : postgres
temp :
medium : memory
2023-05-04 12:42:48 -05:00
- name : mysql57
temp :
medium : memory
- name : mysql80
2021-12-15 06:48:59 -06:00
temp :
medium : memory
2021-11-17 03:25:55 -06:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-11-17 03:25:55 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2021-11-17 03:25:55 -06:00
kind : pipeline
2022-02-21 05:55:16 -06:00
name : pr-docs
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-02-21 05:55:16 -06:00
name : identify-runner
2022-04-14 06:56:14 -05:00
- commands :
2022-02-21 05:55:16 -06:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2022-02-21 05:55:16 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- pip3 install codespell
2023-08-03 08:53:13 -05:00
- codespell -I .codespellignore docs/
2023-09-12 10:19:06 -05:00
image : python:3.8
2022-03-11 08:48:23 -06:00
name : codespell
- commands :
- yarn run prettier:checkDocs
2022-02-21 05:55:16 -06:00
depends_on :
2022-04-14 06:56:14 -05:00
- yarn-install
2022-03-11 08:48:23 -06:00
environment :
NODE_OPTIONS : --max_old_space_size=8192
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-03-11 08:48:23 -06:00
name : lint-docs
2022-02-21 05:55:16 -06:00
- commands :
2023-02-21 07:41:39 -06:00
- mkdir -p /hugo/content/docs/grafana/latest
2023-10-03 03:14:06 -05:00
- 'echo -e ''---\nredirectURL: /docs/grafana/latest/\ntype : redirect\nversioned :
true \n---\n'' > /hugo/content/docs/grafana/_index.md'
2022-02-21 05:55:16 -06:00
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
- cd /hugo && make prod
2023-10-27 12:30:56 -05:00
image : grafana/docs-base:latest
2022-02-21 05:55:16 -06:00
name : build-docs-website
2023-10-27 12:30:56 -05:00
pull : always
2023-07-20 04:48:12 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-20 04:48:12 -05:00
- CODEGEN_VERIFY=1 make gen-cue
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-20 04:48:12 -05:00
name : verify-gen-cue
2022-02-21 05:55:16 -06:00
trigger :
event :
- pull_request
paths :
include :
2022-04-28 09:41:46 -05:00
- '*.md'
2022-02-21 05:55:16 -06:00
- docs/**
2022-08-10 05:39:56 -05:00
- packages/**/*.md
2022-04-28 09:41:46 -05:00
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2022-02-21 05:55:16 -06:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2022-02-21 05:55:16 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-02-21 05:55:16 -06:00
kind : pipeline
2022-09-14 01:00:06 -05:00
name : pr-shellcheck
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-14 01:00:06 -05:00
name : compile-build-cmd
- commands :
2023-09-12 16:44:33 -05:00
- apt-get update -yq && apt-get install shellcheck
2023-09-12 10:19:06 -05:00
- shellcheck -e SC1071 -e SC2162 scripts/**/*.sh
2023-09-12 16:44:33 -05:00
image : ubuntu:22.04
2022-09-14 01:00:06 -05:00
name : shellcheck
trigger :
event :
- pull_request
paths :
exclude :
- '*.md'
- docs/**
- latest.json
include :
- scripts/**/*.sh
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
Chore: Add CI Pipeline to generate Grafana's OpenAPI specification (#75393)
* chore: move over initial changes from sofia's pr #58029
* chore: remove go_image
* chore: begin removing edition, remove unused imports
* chore: remove edition from swagger_gen.star and generate .drone.yml
* chore: regen drone.yml
* fix: fix order of load statements
* fix: try #2 fix order of load statements
* linter fixes
* chore: add doc comment explaining purpose of new clone_pr_branch step
* fix: add placeholder documentation for ver_mode arg
* attempt #1 to import and use clone_enterprise_step_pr
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* attempt #2 to import and use clone_enterprise_step_pr
* fix: fix drone lint err invalid or unknown step dependency
* fix: regen hmac to make drone run
* fix: fix drone lint err
* fix: update swagger-clean cmd in step
* attempt to return non zero exit code
* test to see if pipeline fails
* fix: add git to clone pr branch step
* fix: add git and make to swagger-gen step
* try to rerun drone
* debug: figure out why cannot find make swagger-clean
* debug: see if cd grafana/grafana fixes things
* debug: undo cd grafana/grafana
* debug: add more logging statements
* debug: try and remove cd grafana in swagger-gen
* debug: removed grafana after clone statement; add debug before cloning
* fix: remove disable clone
* regen specs to see if swagger-gen step passes now
* add descriptive error message to swagger-gen step
* remove api-spec.json from .gitignore
* revert backend change, regen spec
* add back backend change, regen specs
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* revert gitignore change, set enterprise source to drone source branch
* chore: remove unused variable, change committish var name to source
* testing functionality: make a new BE change without gen spec, pipeline should fail
* test functionality: does removing err msg cause step to fail properly
* test functionality: add back err msg and && after
* chore: remove debug statements from swagger gen step
* chore: remove debug lines from clone_pr_branch step
* test functionality: regen specs, swagger_gen step should pass
* test funcionality: regen specs again ????
* chore: update swagger-gen step err msg
* test functionality: make BE change dont regen spec, swagger gen should fail
* test functionality: regen the specs, swagger-gen should pass
* chore: revert test BE change, regen spec
* chore: remove unused clone step
* chore: regen drone.yml
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-10-24 12:01:04 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : pr-swagger-gen
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- apk add --update curl jq bash
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
| jq .head.repo.fork)
- if [ "$is_fork" != false ]; then return 1; fi
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
grafana-enterprise
- cd grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout main; then echo "git checkout main"; else git checkout main;
fi
environment :
GITHUB_TOKEN :
from_secret : github_token
2023-10-26 11:55:56 -05:00
failure : ignore
Chore: Add CI Pipeline to generate Grafana's OpenAPI specification (#75393)
* chore: move over initial changes from sofia's pr #58029
* chore: remove go_image
* chore: begin removing edition, remove unused imports
* chore: remove edition from swagger_gen.star and generate .drone.yml
* chore: regen drone.yml
* fix: fix order of load statements
* fix: try #2 fix order of load statements
* linter fixes
* chore: add doc comment explaining purpose of new clone_pr_branch step
* fix: add placeholder documentation for ver_mode arg
* attempt #1 to import and use clone_enterprise_step_pr
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* attempt #2 to import and use clone_enterprise_step_pr
* fix: fix drone lint err invalid or unknown step dependency
* fix: regen hmac to make drone run
* fix: fix drone lint err
* fix: update swagger-clean cmd in step
* attempt to return non zero exit code
* test to see if pipeline fails
* fix: add git to clone pr branch step
* fix: add git and make to swagger-gen step
* try to rerun drone
* debug: figure out why cannot find make swagger-clean
* debug: see if cd grafana/grafana fixes things
* debug: undo cd grafana/grafana
* debug: add more logging statements
* debug: try and remove cd grafana in swagger-gen
* debug: removed grafana after clone statement; add debug before cloning
* fix: remove disable clone
* regen specs to see if swagger-gen step passes now
* add descriptive error message to swagger-gen step
* remove api-spec.json from .gitignore
* revert backend change, regen spec
* add back backend change, regen specs
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* revert gitignore change, set enterprise source to drone source branch
* chore: remove unused variable, change committish var name to source
* testing functionality: make a new BE change without gen spec, pipeline should fail
* test functionality: does removing err msg cause step to fail properly
* test functionality: add back err msg and && after
* chore: remove debug statements from swagger gen step
* chore: remove debug lines from clone_pr_branch step
* test functionality: regen specs, swagger_gen step should pass
* test funcionality: regen specs again ????
* chore: update swagger-gen step err msg
* test functionality: make BE change dont regen spec, swagger gen should fail
* test functionality: regen the specs, swagger-gen should pass
* chore: revert test BE change, regen spec
* chore: remove unused clone step
* chore: regen drone.yml
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-10-24 12:01:04 -05:00
image : alpine/git:2.40.1
name : clone-enterprise
- commands :
- apk add --update git make
- make swagger-clean && make openapi3-gen
- for f in public/api-merged.json public/openapi3.json; do git add $f; done
- if [ -z "$(git diff --name-only --cached)" ]; then echo "Everything seems up to
date!"; else echo "Please ensure the branch is up-to-date, then regenerate the
specification by running make swagger-clean && make openapi3-gen" && return 1;
fi
depends_on :
- clone-enterprise
environment :
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
Chore: Add CI Pipeline to generate Grafana's OpenAPI specification (#75393)
* chore: move over initial changes from sofia's pr #58029
* chore: remove go_image
* chore: begin removing edition, remove unused imports
* chore: remove edition from swagger_gen.star and generate .drone.yml
* chore: regen drone.yml
* fix: fix order of load statements
* fix: try #2 fix order of load statements
* linter fixes
* chore: add doc comment explaining purpose of new clone_pr_branch step
* fix: add placeholder documentation for ver_mode arg
* attempt #1 to import and use clone_enterprise_step_pr
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* attempt #2 to import and use clone_enterprise_step_pr
* fix: fix drone lint err invalid or unknown step dependency
* fix: regen hmac to make drone run
* fix: fix drone lint err
* fix: update swagger-clean cmd in step
* attempt to return non zero exit code
* test to see if pipeline fails
* fix: add git to clone pr branch step
* fix: add git and make to swagger-gen step
* try to rerun drone
* debug: figure out why cannot find make swagger-clean
* debug: see if cd grafana/grafana fixes things
* debug: undo cd grafana/grafana
* debug: add more logging statements
* debug: try and remove cd grafana in swagger-gen
* debug: removed grafana after clone statement; add debug before cloning
* fix: remove disable clone
* regen specs to see if swagger-gen step passes now
* add descriptive error message to swagger-gen step
* remove api-spec.json from .gitignore
* revert backend change, regen spec
* add back backend change, regen specs
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Update scripts/drone/pipelines/swagger_gen.star
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* revert gitignore change, set enterprise source to drone source branch
* chore: remove unused variable, change committish var name to source
* testing functionality: make a new BE change without gen spec, pipeline should fail
* test functionality: does removing err msg cause step to fail properly
* test functionality: add back err msg and && after
* chore: remove debug statements from swagger gen step
* chore: remove debug lines from clone_pr_branch step
* test functionality: regen specs, swagger_gen step should pass
* test funcionality: regen specs again ????
* chore: update swagger-gen step err msg
* test functionality: make BE change dont regen spec, swagger gen should fail
* test functionality: regen the specs, swagger-gen should pass
* chore: revert test BE change, regen spec
* chore: remove unused clone step
* chore: regen drone.yml
---------
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2023-10-24 12:01:04 -05:00
name : swagger-gen
trigger :
event :
- pull_request
paths :
exclude :
- docs/**
- '*.md'
include :
- pkg/**
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-09-14 01:00:06 -05:00
kind : pipeline
2023-07-07 03:55:01 -05:00
name : pr-integration-benchmarks
node :
type : no -parallel
platform :
arch : amd64
os : linux
services :
- environment :
PGDATA : /var/lib/postgresql/data/pgdata
POSTGRES_DB : grafanatest
POSTGRES_PASSWORD : grafanatest
POSTGRES_USER : grafanatest
image : postgres:12.3-alpine
name : postgres
volumes :
- name : postgres
path : /var/lib/postgresql/data/pgdata
- commands :
- docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment :
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:5.7.39
name : mysql57
volumes :
- name : mysql57
path : /var/lib/mysql
- commands :
- docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password
environment :
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:8.0.32
name : mysql80
volumes :
- name : mysql80
path : /var/lib/mysql
2023-10-05 13:09:26 -05:00
- commands :
- /bin/mimir -target=backend
environment : {}
2023-11-23 10:59:36 -06:00
image : us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-10-17 05:21:45 -05:00
name : mimir_backend
2023-07-07 03:55:01 -05:00
- environment : {}
image : redis:6.2.11-alpine
name : redis
- environment : {}
image : memcached:1.6.9-alpine
name : memcached
steps :
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update curl jq bash
2023-07-07 03:55:01 -05:00
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
../grafana-enterprise
- cd ../grafana-enterprise
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
else git checkout main; fi
- cd ../
- ln -s src grafana
- cd ./grafana-enterprise
- ./build.sh
environment :
GITHUB_TOKEN :
from_secret : github_token
failure : ignore
2023-09-12 10:19:06 -05:00
image : alpine/git:2.40.1
2023-07-07 03:55:01 -05:00
name : clone-enterprise
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : compile-build-cmd
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-07 03:55:01 -05:00
- CODEGEN_VERIFY=1 make gen-cue
depends_on :
- clone-enterprise
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : verify-gen-cue
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-07 03:55:01 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on :
- clone-enterprise
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : verify-gen-jsonnet
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-07 03:55:01 -05:00
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : wire-install
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-07-07 03:55:01 -05:00
- if [ -z ${GO_PACKAGES} ]; then echo 'missing GO_PACKAGES'; false; fi
- go test -v -run=^$ -benchmem -timeout=1h -count=8 -bench=. ${GO_PACKAGES}
depends_on :
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : sqlite-benchmark-integration-tests
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-07-07 03:55:01 -05:00
- if [ -z ${GO_PACKAGES} ]; then echo 'missing GO_PACKAGES'; false; fi
- go test -v -run=^$ -benchmem -timeout=1h -count=8 -bench=. ${GO_PACKAGES}
depends_on :
- wire-install
environment :
GRAFANA_TEST_DB : postgres
PGPASSWORD : grafanatest
POSTGRES_HOST : postgres
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : postgres-benchmark-integration-tests
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-07-07 03:55:01 -05:00
- if [ -z ${GO_PACKAGES} ]; then echo 'missing GO_PACKAGES'; false; fi
- go test -v -run=^$ -benchmem -timeout=1h -count=8 -bench=. ${GO_PACKAGES}
depends_on :
- wire-install
environment :
GRAFANA_TEST_DB : mysql
MYSQL_HOST : mysql57
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : mysql-5.7-benchmark-integration-tests
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-07-07 03:55:01 -05:00
- if [ -z ${GO_PACKAGES} ]; then echo 'missing GO_PACKAGES'; false; fi
- go test -v -run=^$ -benchmem -timeout=1h -count=8 -bench=. ${GO_PACKAGES}
depends_on :
- wire-install
environment :
GRAFANA_TEST_DB : mysql
MYSQL_HOST : mysql80
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-07 03:55:01 -05:00
name : mysql-8.0-benchmark-integration-tests
trigger :
event :
- promote
target :
- gobenchmarks
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
- name : postgres
temp :
medium : memory
- name : mysql57
temp :
medium : memory
- name : mysql80
temp :
medium : memory
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2022-02-22 12:06:14 -06:00
name : main-docs
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-02-22 12:06:14 -06:00
name : identify-runner
2022-04-14 06:56:14 -05:00
- commands :
2022-02-22 12:06:14 -06:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2022-02-22 12:06:14 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- pip3 install codespell
2023-08-03 08:53:13 -05:00
- codespell -I .codespellignore docs/
2023-09-12 10:19:06 -05:00
image : python:3.8
2022-03-11 08:48:23 -06:00
name : codespell
- commands :
- yarn run prettier:checkDocs
2022-02-22 12:06:14 -06:00
depends_on :
2022-04-14 06:56:14 -05:00
- yarn-install
2022-03-11 08:48:23 -06:00
environment :
NODE_OPTIONS : --max_old_space_size=8192
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-03-11 08:48:23 -06:00
name : lint-docs
2022-02-22 12:06:14 -06:00
- commands :
2023-02-21 07:41:39 -06:00
- mkdir -p /hugo/content/docs/grafana/latest
2023-10-03 03:14:06 -05:00
- 'echo -e ''---\nredirectURL: /docs/grafana/latest/\ntype : redirect\nversioned :
true \n---\n'' > /hugo/content/docs/grafana/_index.md'
2022-02-22 12:06:14 -06:00
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
- cd /hugo && make prod
2023-10-27 12:30:56 -05:00
image : grafana/docs-base:latest
2022-02-22 12:06:14 -06:00
name : build-docs-website
2023-10-27 12:30:56 -05:00
pull : always
2023-07-20 04:48:12 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-20 04:48:12 -05:00
- CODEGEN_VERIFY=1 make gen-cue
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-20 04:48:12 -05:00
name : verify-gen-cue
2022-02-22 12:06:14 -06:00
trigger :
branch : main
event :
- push
2022-08-03 07:08:43 -05:00
paths :
include :
- '*.md'
- docs/**
2022-08-10 05:39:56 -05:00
- packages/**/*.md
2022-08-03 07:08:43 -05:00
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2022-02-22 12:06:14 -06:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2022-02-22 12:06:14 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-02-22 12:06:14 -06:00
kind : pipeline
2022-05-03 06:54:47 -05:00
name : main-test-frontend
2021-10-14 09:02:45 -05:00
node :
type : no -parallel
2020-07-17 06:52:09 -05:00
platform :
arch : amd64
2021-10-14 09:02:45 -05:00
os : linux
2021-12-20 02:09:25 -06:00
services : [ ]
2020-07-17 06:52:09 -05:00
steps :
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
- commands :
2021-10-08 09:19:10 -05:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2022-06-29 09:04:52 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update git bash
2022-06-29 09:04:52 -05:00
- yarn betterer ci
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-06-29 09:04:52 -05:00
name : betterer-frontend
2022-05-03 06:54:47 -05:00
- commands :
- yarn run ci:test-frontend
depends_on :
- yarn-install
environment :
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-05-03 06:54:47 -05:00
name : test-frontend
trigger :
branch : main
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2022-05-03 06:54:47 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2022-05-03 06:54:47 -05:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-05-03 06:54:47 -05:00
kind : pipeline
2022-09-21 14:39:28 -05:00
name : main-lint-frontend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-09-21 14:39:28 -05:00
name : identify-runner
- commands :
- yarn install --immutable
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-09-21 14:39:28 -05:00
name : yarn-install
- commands :
- yarn run prettier:check
- yarn run lint
- yarn run typecheck
depends_on :
- yarn-install
environment :
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-09-21 14:39:28 -05:00
name : lint-frontend
2023-06-06 02:29:04 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update git
2023-06-06 02:29:04 -05:00
- |-
yarn run i18n:extract || (echo "
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
- "\n file_diff=$(git diff --dirstat public/locales)\n if
[ -n \"$file_diff\" ]; then\n echo $file_diff\n echo
\"\nTranslation extraction has not been committed. Please run 'yarn i18n:extract',
commit the changes and push again.\"\n exit 1\n fi\n
\ "
- yarn run i18n:compile
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-06-06 02:29:04 -05:00
name : verify-i18n
2022-09-21 14:39:28 -05:00
trigger :
branch : main
event :
- push
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2022-09-21 14:39:28 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
2022-10-10 10:46:56 -05:00
environment :
EDITION : oss
2022-09-21 14:39:28 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2022-05-03 06:54:47 -05:00
name : main-test-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-05-03 06:54:47 -05:00
name : identify-runner
2022-06-09 01:48:27 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-09 01:48:27 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2022-06-22 08:22:42 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-09 01:48:27 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2022-05-03 06:54:47 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-05-03 06:54:47 -05:00
- make gen-go
2022-06-09 01:48:27 -05:00
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-05-03 06:54:47 -05:00
name : wire-install
2021-10-14 09:02:45 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base shared-mime-info shared-mime-info-lang
2023-01-31 11:43:07 -06:00
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
2021-10-11 04:23:55 -05:00
depends_on :
2022-04-14 06:56:14 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-10-14 09:02:45 -05:00
name : test-backend
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-04-17 11:33:43 -05:00
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-08-24 10:07:06 -05:00
depends_on :
2022-04-14 06:56:14 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-10-14 09:02:45 -05:00
name : test-backend-integration
2022-09-21 06:05:19 -05:00
trigger :
branch : main
event :
- push
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2022-09-21 06:05:19 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 06:05:19 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : main-lint-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-09-21 06:05:19 -05:00
name : identify-runner
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : compile-build-cmd
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-09-21 06:05:19 -05:00
- make gen-go
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : wire-install
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make build-base
2022-09-21 06:05:19 -05:00
- make lint-go
depends_on :
- wire-install
environment :
CGO_ENABLED : "1"
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-09-21 06:05:19 -05:00
name : lint-backend
2023-05-31 15:57:45 -05:00
- commands :
- go run scripts/modowners/modowners.go check go.mod
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-31 15:57:45 -05:00
name : validate-modfile
2023-09-20 10:46:15 -05:00
- commands :
- apk add --update make
2023-09-25 14:34:57 -05:00
- make swagger-validate
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-09-20 10:46:15 -05:00
name : validate-openapi-spec
2022-07-20 08:43:19 -05:00
- commands :
2022-09-14 09:07:09 -05:00
- ./bin/build verify-drone
2022-07-20 08:43:19 -05:00
depends_on :
2022-09-14 09:45:00 -05:00
- compile-build-cmd
2022-07-20 08:43:19 -05:00
image : byrnedo/alpine-curl:0.1.8
name : lint-drone
2021-12-20 02:09:25 -06:00
trigger :
branch : main
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2021-12-20 02:09:25 -06:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-12-20 02:09:25 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2021-12-20 02:09:25 -06:00
kind : pipeline
name : main-build-e2e-publish
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
2021-10-21 15:28:57 -05:00
- commands :
2021-12-20 02:09:25 -06:00
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2021-12-20 02:09:25 -06:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
2022-07-28 09:11:22 -05:00
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2022-08-01 05:56:06 -05:00
depends_on : [ ]
2022-07-28 09:11:22 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-07-28 09:11:22 -05:00
name : compile-build-cmd
2022-06-09 01:48:27 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-09 01:48:27 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2022-06-22 08:22:42 -05:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-09 01:48:27 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2021-12-20 02:09:25 -06:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2021-12-20 02:09:25 -06:00
- make gen-go
2022-06-09 01:48:27 -05:00
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-04-14 06:56:14 -05:00
name : wire-install
- commands :
2021-12-20 02:09:25 -06:00
- yarn install --immutable
2022-10-11 10:58:03 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-04-14 06:56:14 -05:00
name : yarn-install
2023-09-18 16:53:42 -05:00
- commands :
- apk add --update jq
2023-09-25 10:01:17 -05:00
- new_version=$(cat package.json | jq .version | sed s/pre/${DRONE_BUILD_NUMBER}/g)
2023-09-18 16:53:42 -05:00
- 'echo "New version: $new_version"'
- yarn run lerna version $new_version --exact --no-git-tag-version --no-push --force-publish
-y
- yarn install --mode=update-lockfile
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-09-18 16:53:42 -05:00
name : update-package-json-version
2021-10-14 09:02:45 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update jq bash
- yarn packages:build
2023-04-18 03:19:37 -05:00
- yarn packages:pack
- ./scripts/validate-npm-packages.sh
2022-03-02 05:02:07 -06:00
depends_on :
2022-04-14 06:56:14 -05:00
- yarn-install
2023-09-18 16:53:42 -05:00
- update-package-json-version
2022-03-02 05:02:07 -06:00
environment :
NODE_OPTIONS : --max_old_space_size=8192
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-03-02 05:02:07 -06:00
name : build-frontend-packages
2021-10-14 09:02:45 -05:00
- commands :
2023-10-31 15:52:09 -05:00
- /src/grafana-build artifacts -a targz:grafana:linux/amd64 -a targz:grafana:linux/arm64
2023-12-15 08:56:22 -06:00
-a targz:grafana:linux/arm/v7 --go-version=1.21.5 --yarn-cache=$$YARN_CACHE_FOLDER
--build-id=$$DRONE_BUILD_NUMBER --grafana-dir=$$PWD > packages.txt
2021-10-14 09:02:45 -05:00
depends_on :
2023-10-24 03:52:14 -05:00
- update-package-json-version
2023-09-12 10:19:06 -05:00
image : grafana/grafana-build:main
name : rgm-package
2023-09-12 12:59:02 -05:00
pull : always
2023-09-12 10:19:06 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2021-10-14 09:02:45 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update tar bash
- mkdir grafana
- tar --strip-components=1 -xvf ./dist/*amd64.tar.gz -C grafana
- cp -r devenv scripts tools grafana && cd grafana && ./scripts/grafana-server/start-server
2020-07-17 06:52:09 -05:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-package
2021-10-14 09:02:45 -05:00
detach : true
environment :
2023-09-12 10:19:06 -05:00
GF_APP_MODE : development
GF_SERVER_HTTP_PORT : "3001"
GF_SERVER_ROUTER_LOGGING : "1"
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-01-20 11:01:00 -06:00
name : grafana-server
2021-10-14 09:02:45 -05:00
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
2020-07-17 06:52:09 -05:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-10-14 09:02:45 -05:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-dashboards-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-smoke-tests-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite panels-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-panels-suite
- commands :
2022-09-02 10:02:10 -05:00
- ./bin/build e2e-tests --port 3001 --suite various-suite
2021-11-24 04:20:11 -06:00
depends_on :
2022-02-02 04:40:22 -06:00
- grafana-server
2021-11-24 04:20:11 -06:00
environment :
2022-01-20 11:01:00 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : cypress/included:13.1.0
2021-11-24 04:20:11 -06:00
name : end-to-end-tests-various-suite
2022-11-08 04:27:54 -06:00
- commands :
- cd /
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
depends_on :
- grafana-server
environment :
AZURE_SP_APP_ID :
from_secret : azure_sp_app_id
AZURE_SP_PASSWORD :
from_secret : azure_sp_app_pw
AZURE_TENANT :
from_secret : azure_tenant
CYPRESS_CI : "true"
GITHUB_TOKEN :
2023-09-07 11:26:43 -05:00
from_secret : github_token
2022-11-08 04:27:54 -06:00
HOST : grafana-server
2023-09-13 05:08:43 -05:00
image : us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:3.0.0
2022-11-08 04:27:54 -06:00
name : end-to-end-tests-cloud-plugins-suite-azure
when :
paths :
include :
- pkg/tsdb/azuremonitor/**
2023-02-03 10:06:54 -06:00
- public/app/plugins/datasource/azuremonitor/**
2022-12-21 10:42:24 -06:00
- e2e/cloud-plugins-suite/azure-monitor.spec.ts
2022-11-08 04:27:54 -06:00
repo :
- grafana/grafana
2021-12-24 03:43:32 -06:00
- commands :
- apt-get update
- apt-get install -yq zip
- printenv GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY > /tmp/gcpkey_upload_artifacts.json
- gcloud auth activate-service-account --key-file=/tmp/gcpkey_upload_artifacts.json
- find ./e2e -type f -name "*spec.ts.mp4" | zip e2e/videos.zip -@
- gsutil cp e2e/videos.zip gs://$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
- export E2E_ARTIFACTS_VIDEO_ZIP=https://storage.googleapis.com/$${E2E_TEST_ARTIFACTS_BUCKET}/${DRONE_BUILD_NUMBER}/artifacts/videos/videos.zip
- 'echo "E2E Test artifacts uploaded to: $${E2E_ARTIFACTS_VIDEO_ZIP}"'
- 'curl -X POST https://api.github.com/repos/${DRONE_REPO}/statuses/${DRONE_COMMIT_SHA}
-H "Authorization: token $${GITHUB_TOKEN}" -d "{\"state\":\"success\",\"target_url\":\"$${E2E_ARTIFACTS_VIDEO_ZIP}\",
\"description\": \"Click on the details to download e2e recording videos\", \"context\":
\"e2e_artifacts\"}"'
depends_on :
- end-to-end-tests-dashboards-suite
- end-to-end-tests-panels-suite
- end-to-end-tests-smoke-tests-suite
- end-to-end-tests-various-suite
environment :
E2E_TEST_ARTIFACTS_BUCKET : releng-pipeline-artifacts-dev
GCP_GRAFANA_UPLOAD_ARTIFACTS_KEY :
from_secret : gcp_upload_artifacts_key
GITHUB_TOKEN :
from_secret : github_token
2022-10-20 07:18:33 -05:00
failure : ignore
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2022-01-12 09:58:35 -06:00
name : e2e-tests-artifacts-upload
when :
status :
- success
- failure
2021-10-14 09:02:45 -05:00
- commands :
2020-07-17 06:52:09 -05:00
- yarn storybook:build
2022-12-07 01:56:15 -06:00
- ./bin/build verify-storybook
2020-07-17 08:30:43 -05:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-package
2022-03-02 05:02:07 -06:00
- build-frontend-packages
2021-10-14 09:02:45 -05:00
environment :
NODE_OPTIONS : --max_old_space_size=4096
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2021-10-14 09:02:45 -05:00
name : build-storybook
2022-09-07 07:08:13 -05:00
when :
paths :
include :
- packages/grafana-ui/**
2022-07-20 08:43:19 -05:00
- commands :
2023-10-31 09:11:54 -05:00
- npx wait-on@7.0.1 http://$HOST:$PORT
2022-07-20 08:43:19 -05:00
- pa11y-ci --config .pa11yci.conf.js --json > pa11y-ci-results.json
depends_on :
- grafana-server
environment :
GRAFANA_MISC_STATS_API_KEY :
from_secret : grafana_misc_stats_api_key
HOST : grafana-server
PORT : 3001
failure : ignore
2022-07-28 11:49:41 -05:00
image : grafana/docker-puppeteer:1.1.0
2022-07-20 08:43:19 -05:00
name : test-a11y-frontend
2021-10-14 09:02:45 -05:00
- commands :
2022-09-15 03:06:43 -05:00
- ./bin/build store-storybook --deployment canary
2020-07-17 06:52:09 -05:00
depends_on :
2020-07-17 08:30:43 -05:00
- build-storybook
2021-11-24 04:20:11 -06:00
- end-to-end-tests-dashboards-suite
- end-to-end-tests-panels-suite
- end-to-end-tests-smoke-tests-suite
- end-to-end-tests-various-suite
2021-10-14 09:02:45 -05:00
environment :
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2021-11-30 04:53:07 -06:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
2022-07-20 05:34:09 -05:00
image : grafana/grafana-ci-deploy:1.3.3
2021-12-20 05:23:51 -06:00
name : store-storybook
2022-04-06 02:46:05 -05:00
when :
2022-09-07 07:08:13 -05:00
paths :
include :
- packages/grafana-ui/**
2022-04-06 02:46:05 -05:00
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
- commands :
2023-09-14 08:48:31 -05:00
- apk add --update bash grep git
- ./scripts/ci-frontend-metrics.sh ./grafana/public/build | ./bin/build publish-metrics
$$GRAFANA_MISC_STATS_API_KEY
2021-10-14 09:02:45 -05:00
depends_on :
- test-a11y-frontend
2021-06-29 03:29:34 -05:00
environment :
GRAFANA_MISC_STATS_API_KEY :
from_secret : grafana_misc_stats_api_key
failure : ignore
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2021-10-14 09:02:45 -05:00
name : publish-frontend-metrics
2022-04-06 02:46:05 -05:00
when :
repo :
- grafana/grafana
2022-02-07 11:30:41 -06:00
- commands :
2023-09-12 12:59:02 -05:00
- docker run --privileged --rm tonistiigi/binfmt --install all
2023-10-31 15:52:09 -05:00
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
2023-12-20 07:55:23 -06:00
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
--ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.18.4 --tag-format='{{ .version_base
}}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{ .version_base
}}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
2023-09-12 10:19:06 -05:00
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
2022-02-07 11:30:41 -06:00
depends_on :
2023-11-01 11:25:49 -05:00
- update-package-json-version
2023-09-12 10:19:06 -05:00
image : grafana/grafana-build:main
name : rgm-build-docker
2023-09-12 12:59:02 -05:00
pull : always
2022-02-07 11:30:41 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
- commands :
2022-11-04 06:21:18 -05:00
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana
2022-02-07 11:30:41 -06:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-build-docker
2022-02-07 11:30:41 -06:00
environment :
DOCKER_PASSWORD :
2020-09-24 08:20:48 -05:00
from_secret : docker_password
2022-02-07 11:30:41 -06:00
DOCKER_USER :
from_secret : docker_username
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2023-05-15 08:33:31 -05:00
GITHUB_APP_ID :
from_secret : delivery-bot-app-id
GITHUB_APP_INSTALLATION_ID :
from_secret : delivery-bot-app-installation-id
GITHUB_APP_PRIVATE_KEY :
from_secret : delivery-bot-app-private-key
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2022-11-21 12:06:00 -06:00
name : publish-images-grafana
2022-02-07 11:30:41 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
2022-04-06 02:46:05 -05:00
when :
repo :
- grafana/grafana
2022-02-07 11:30:41 -06:00
- commands :
2022-11-04 06:21:18 -05:00
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-oss
2022-02-07 11:30:41 -06:00
depends_on :
2023-09-12 10:19:06 -05:00
- rgm-build-docker
2022-02-07 11:30:41 -06:00
environment :
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USER :
from_secret : docker_username
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2023-05-15 08:33:31 -05:00
GITHUB_APP_ID :
from_secret : delivery-bot-app-id
GITHUB_APP_INSTALLATION_ID :
from_secret : delivery-bot-app-installation-id
GITHUB_APP_PRIVATE_KEY :
from_secret : delivery-bot-app-private-key
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2022-11-21 12:06:00 -06:00
name : publish-images-grafana-oss
2022-02-07 11:30:41 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
2022-04-06 02:46:05 -05:00
when :
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
- commands :
2023-09-14 08:59:34 -05:00
- apk add --update bash
2023-04-18 04:02:37 -05:00
- ./scripts/publish-npm-packages.sh --dist-tag 'canary' --registry 'https://registry.npmjs.org'
2021-10-14 09:02:45 -05:00
depends_on :
2021-11-24 04:20:11 -06:00
- end-to-end-tests-dashboards-suite
- end-to-end-tests-panels-suite
- end-to-end-tests-smoke-tests-suite
- end-to-end-tests-various-suite
2023-09-12 10:19:06 -05:00
- build-frontend-packages
2020-07-17 06:52:09 -05:00
environment :
2021-12-13 02:50:19 -06:00
NPM_TOKEN :
from_secret : npm_token
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2021-10-14 09:02:45 -05:00
name : release-canary-npm-packages
2022-04-06 02:46:05 -05:00
when :
2023-04-18 03:19:37 -05:00
paths :
include :
- packages/**
2022-04-06 02:46:05 -05:00
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
- commands :
2022-11-18 09:22:14 -06:00
- ./bin/build upload-packages --edition oss
2020-07-17 06:52:09 -05:00
depends_on :
2021-11-24 04:20:11 -06:00
- end-to-end-tests-dashboards-suite
- end-to-end-tests-panels-suite
- end-to-end-tests-smoke-tests-suite
- end-to-end-tests-various-suite
2021-02-09 07:55:11 -06:00
environment :
2022-02-07 03:11:27 -06:00
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads_base64
2021-11-30 04:53:07 -06:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
2022-07-20 05:34:09 -05:00
image : grafana/grafana-ci-deploy:1.3.3
2021-10-14 09:02:45 -05:00
name : upload-packages
2022-04-06 02:46:05 -05:00
when :
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
- commands :
2022-11-18 07:37:18 -06:00
- ./bin/build upload-cdn --edition oss
2021-02-09 07:55:11 -06:00
depends_on :
2022-01-20 11:01:00 -06:00
- grafana-server
2020-07-17 06:52:09 -05:00
environment :
2022-02-07 03:11:27 -06:00
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2021-11-30 04:53:07 -06:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
2022-07-20 05:34:09 -05:00
image : grafana/grafana-ci-deploy:1.3.3
2021-10-14 09:02:45 -05:00
name : upload-cdn-assets
2022-04-06 02:46:05 -05:00
when :
repo :
- grafana/grafana
2020-07-17 06:52:09 -05:00
trigger :
2021-10-14 09:02:45 -05:00
branch : main
2020-07-17 06:52:09 -05:00
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2020-08-19 04:46:36 -05:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-12-20 02:09:25 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2021-12-20 02:09:25 -06:00
kind : pipeline
name : main-integration-tests
node :
type : no -parallel
platform :
arch : amd64
os : linux
2021-12-20 02:33:47 -06:00
services :
- environment :
PGDATA : /var/lib/postgresql/data/pgdata
POSTGRES_DB : grafanatest
POSTGRES_PASSWORD : grafanatest
POSTGRES_USER : grafanatest
image : postgres:12.3-alpine
name : postgres
volumes :
- name : postgres
path : /var/lib/postgresql/data/pgdata
2023-06-14 18:00:45 -05:00
- commands :
- docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment :
2021-12-20 02:33:47 -06:00
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
2022-09-08 02:03:02 -05:00
image : mysql:5.7.39
2023-05-04 12:42:48 -05:00
name : mysql57
volumes :
- name : mysql57
path : /var/lib/mysql
- commands :
- docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password
environment :
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:8.0.32
name : mysql80
2021-12-20 02:33:47 -06:00
volumes :
2023-05-04 12:42:48 -05:00
- name : mysql80
2021-12-20 02:33:47 -06:00
path : /var/lib/mysql
2023-10-05 13:09:26 -05:00
- commands :
- /bin/mimir -target=backend
environment : {}
2023-11-23 10:59:36 -06:00
image : us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-10-17 05:21:45 -05:00
name : mimir_backend
2023-04-05 03:55:55 -05:00
- environment : {}
image : redis:6.2.11-alpine
name : redis
- environment : {}
image : memcached:1.6.9-alpine
name : memcached
2021-12-20 02:09:25 -06:00
steps :
- commands :
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2021-12-20 02:09:25 -06:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
2022-07-28 09:11:22 -05:00
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2022-08-01 05:56:06 -05:00
depends_on : [ ]
2022-07-28 09:11:22 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-07-28 09:11:22 -05:00
name : compile-build-cmd
2022-04-14 06:56:14 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2022-04-14 06:56:14 -05:00
name : identify-runner
2022-06-16 09:41:56 -05:00
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-16 09:41:56 -05:00
- CODEGEN_VERIFY=1 make gen-cue
2023-02-01 14:27:57 -06:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-16 09:41:56 -05:00
name : verify-gen-cue
2022-11-03 10:04:39 -05:00
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-11-03 10:04:39 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
2023-02-01 14:27:57 -06:00
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-11-03 10:04:39 -05:00
name : verify-gen-jsonnet
2022-06-16 09:41:56 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2022-06-16 09:41:56 -05:00
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-06-16 09:41:56 -05:00
name : wire-install
2021-12-20 02:09:25 -06:00
- commands :
- dockerize -wait tcp://postgres:5432 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-postgres
- commands :
- apk add --update build-base
- apk add --update postgresql-client
2021-12-20 02:09:25 -06:00
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-12-20 02:09:25 -06:00
depends_on :
2022-06-16 09:41:56 -05:00
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-postgres
2021-12-20 02:09:25 -06:00
environment :
GRAFANA_TEST_DB : postgres
PGPASSWORD : grafanatest
POSTGRES_HOST : postgres
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2021-12-20 02:09:25 -06:00
name : postgres-integration-tests
- commands :
2023-05-04 12:42:48 -05:00
- dockerize -wait tcp://mysql57:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-5.7
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-5.7
2023-05-04 12:42:48 -05:00
environment :
GRAFANA_TEST_DB : mysql
MYSQL_HOST : mysql57
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-5.7-integration-tests
- commands :
- dockerize -wait tcp://mysql80:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-8.0
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
2021-12-20 02:09:25 -06:00
-prootpass
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2021-12-20 02:09:25 -06:00
depends_on :
2022-06-16 09:41:56 -05:00
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-8.0
2021-12-20 02:09:25 -06:00
environment :
GRAFANA_TEST_DB : mysql
2023-05-04 12:42:48 -05:00
MYSQL_HOST : mysql80
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-8.0-integration-tests
2023-04-05 03:55:55 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- dockerize -wait tcp://redis:6379 -timeout 120s
image : jwilder/dockerize:0.6.1
name : wait-for-redis
- commands :
- apk add --update build-base
2023-04-05 03:55:55 -05:00
- go clean -testcache
- go test -run IntegrationRedis -covermode=atomic -timeout=2m ./pkg/...
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-redis
2023-04-05 03:55:55 -05:00
environment :
REDIS_URL : redis://redis:6379/0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-05 03:55:55 -05:00
name : redis-integration-tests
- commands :
- dockerize -wait tcp://memcached:11211 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-memcached
- commands :
- apk add --update build-base
2023-04-05 03:55:55 -05:00
- go clean -testcache
- go test -run IntegrationMemcached -covermode=atomic -timeout=2m ./pkg/...
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-memcached
2023-04-05 03:55:55 -05:00
environment :
MEMCACHED_HOSTS : memcached:11211
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-05 03:55:55 -05:00
name : memcached-integration-tests
2023-10-05 13:09:26 -05:00
- commands :
2023-10-17 05:21:45 -05:00
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
2023-10-05 13:09:26 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-remote-alertmanager
- commands :
- apk add --update build-base
- go clean -testcache
2023-11-22 12:13:04 -06:00
- go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/...
2023-10-05 13:09:26 -05:00
depends_on :
- wire-install
- wait-for-remote-alertmanager
2023-10-17 05:21:45 -05:00
environment :
AM_TENANT_ID : test
AM_URL : http://mimir_backend:8080
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-05 13:09:26 -05:00
name : remote-alertmanager-integration-tests
2021-12-20 02:09:25 -06:00
trigger :
branch : main
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2021-12-20 02:09:25 -06:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
- name : postgres
temp :
medium : memory
2023-05-04 12:42:48 -05:00
- name : mysql57
temp :
medium : memory
- name : mysql80
2021-12-20 02:09:25 -06:00
temp :
medium : memory
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-10-14 09:02:45 -05:00
depends_on :
2022-05-03 06:54:47 -05:00
- main-test-frontend
- main-test-backend
2021-12-20 02:09:25 -06:00
- main-build-e2e-publish
- main-integration-tests
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2020-08-19 04:46:36 -05:00
kind : pipeline
2022-04-26 05:40:13 -05:00
name : main-windows
2020-08-19 04:46:36 -05:00
platform :
arch : amd64
2021-10-14 09:02:45 -05:00
os : windows
version : "1809"
services : [ ]
2020-08-19 04:46:36 -05:00
steps :
2021-10-14 09:02:45 -05:00
- commands :
2020-09-24 08:20:48 -05:00
- echo $env:DRONE_RUNNER_NAME
2021-10-14 09:02:45 -05:00
image : mcr.microsoft.com/windows:1809
name : identify-runner
- commands :
2020-09-24 08:20:48 -05:00
- $$ProgressPreference = "SilentlyContinue"
2023-12-20 09:07:55 -06:00
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/windows/grabpl.exe
2021-10-14 09:02:45 -05:00
-OutFile grabpl.exe
2020-08-19 04:46:36 -05:00
image : grafana/ci-wix:0.1.1
2022-04-14 06:56:14 -05:00
name : windows-init
2020-08-19 04:46:36 -05:00
trigger :
2021-10-14 09:02:45 -05:00
branch : main
2020-08-19 04:46:36 -05:00
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2022-03-29 07:57:54 -05:00
repo :
- grafana/grafana
2021-10-14 09:02:45 -05:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
2023-05-08 08:22:34 -05:00
path : //./pipe/docker_engine/
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2020-08-19 04:46:36 -05:00
depends_on :
2021-12-20 02:09:25 -06:00
- main-build-e2e-publish
- main-integration-tests
2022-11-18 08:15:04 -06:00
environment :
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2022-09-19 09:17:36 -05:00
kind : pipeline
name : main-trigger-downstream
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- image : grafana/drone-downstream
name : trigger-enterprise-downstream
settings :
params :
- SOURCE_BUILD_NUMBER=${DRONE_COMMIT}
- SOURCE_COMMIT=${DRONE_COMMIT}
repositories :
- grafana/grafana-enterprise@main
server : https://drone.grafana.net
token :
from_secret : drone_token
trigger :
branch : main
event :
- push
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-26 08:26:58 -05:00
repo :
2023-07-28 12:36:31 -05:00
- grafana/grafana-security-mirror
2022-09-19 09:17:36 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on :
2022-05-03 06:54:47 -05:00
- main-test-frontend
- main-test-backend
2021-12-20 02:09:25 -06:00
- main-build-e2e-publish
- main-integration-tests
2022-04-26 05:40:13 -05:00
- main-windows
2020-09-30 15:14:47 -05:00
kind : pipeline
2022-04-26 05:40:13 -05:00
name : main-notify
2020-09-30 15:14:47 -05:00
platform :
arch : amd64
2021-10-14 09:02:45 -05:00
os : linux
2020-09-30 15:14:47 -05:00
steps :
2021-10-14 09:02:45 -05:00
- image : plugins/slack
name : slack
2020-09-30 15:14:47 -05:00
settings :
channel : grafana-ci-notifications
2021-10-14 09:02:45 -05:00
template : |-
Build {{build.number}} failed for commit: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{ truncate build.commit 8 }}>: {{build.link}}
Branch : <https://github.com/{{ repo.owner }}/{{ repo.name }}/commits/{{ build.branch }}|{{ build.branch }}>
Author : {{build.author}}
2020-09-30 15:14:47 -05:00
webhook :
from_secret : slack_webhook
trigger :
2021-10-14 09:02:45 -05:00
branch : main
2020-09-30 15:14:47 -05:00
event :
- push
2022-08-03 07:08:43 -05:00
paths :
exclude :
- '*.md'
- docs/**
- latest.json
2023-07-19 09:03:07 -05:00
repo :
- grafana/grafana
2020-09-30 15:14:47 -05:00
status :
- failure
2021-10-14 09:02:45 -05:00
type : docker
2020-10-07 07:22:15 -05:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-10-14 09:02:45 -05:00
depends_on : [ ]
2022-10-04 02:35:18 -05:00
environment :
2022-10-10 10:46:56 -05:00
EDITION : oss
2022-09-21 01:27:43 -05:00
image_pull_secrets :
- dockerconfigjson
2020-10-07 07:22:15 -05:00
kind : pipeline
2023-07-14 06:18:09 -05:00
name : publish-docker-public
2022-01-11 03:17:00 -06:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
2020-10-07 07:22:15 -05:00
steps :
2023-07-14 06:18:09 -05:00
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-07-14 06:18:09 -05:00
name : identify-runner
2021-11-15 11:14:33 -06:00
- commands :
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2021-11-15 11:14:33 -06:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
2022-07-28 09:11:22 -05:00
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2022-07-28 09:11:22 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-07-28 09:11:22 -05:00
name : compile-build-cmd
2022-04-14 06:56:14 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts docker fetch --edition oss
2021-09-30 02:56:08 -05:00
depends_on :
2022-10-11 10:58:03 -05:00
- compile-build-cmd
2020-10-07 07:22:15 -05:00
environment :
2023-07-14 06:18:09 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USER :
from_secret : docker_username
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2023-07-14 06:18:09 -05:00
image : google/cloud-sdk:431.0.0
name : fetch-images
volumes :
- name : docker
path : /var/run/docker.sock
2022-01-11 03:17:00 -06:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana --version-tag
${DRONE_TAG}
2022-01-11 03:17:00 -06:00
depends_on :
2023-07-14 06:18:09 -05:00
- fetch-images
2022-01-11 03:17:00 -06:00
environment :
2023-07-14 06:18:09 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USER :
from_secret : docker_username
2022-01-11 03:17:00 -06:00
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2023-07-14 06:18:09 -05:00
GITHUB_APP_ID :
from_secret : delivery-bot-app-id
GITHUB_APP_INSTALLATION_ID :
from_secret : delivery-bot-app-installation-id
GITHUB_APP_PRIVATE_KEY :
from_secret : delivery-bot-app-private-key
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2023-07-14 06:18:09 -05:00
name : publish-images-grafana
2022-01-11 03:17:00 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-oss --version-tag
${DRONE_TAG}
2022-01-11 03:17:00 -06:00
depends_on :
2023-07-14 06:18:09 -05:00
- fetch-images
2022-01-11 03:17:00 -06:00
environment :
2023-07-14 06:18:09 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USER :
from_secret : docker_username
2022-01-11 03:17:00 -06:00
GCP_KEY :
2023-07-21 08:53:57 -05:00
from_secret : gcp_grafanauploads
2023-07-14 06:18:09 -05:00
GITHUB_APP_ID :
from_secret : delivery-bot-app-id
GITHUB_APP_INSTALLATION_ID :
from_secret : delivery-bot-app-installation-id
GITHUB_APP_PRIVATE_KEY :
from_secret : delivery-bot-app-private-key
2023-05-25 02:17:24 -05:00
image : google/cloud-sdk:431.0.0
2023-07-14 06:18:09 -05:00
name : publish-images-grafana-oss
2022-01-11 03:17:00 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-07-14 06:18:09 -05:00
trigger :
event :
- promote
target :
- public
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : publish-artifacts-public
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2021-10-14 09:02:45 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
2020-12-23 08:42:20 -06:00
environment :
2023-07-14 06:18:09 -05:00
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-14 06:18:09 -05:00
name : compile-build-cmd
2021-10-14 09:02:45 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts packages --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
2020-10-07 07:22:15 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- compile-build-cmd
2021-11-24 04:20:11 -06:00
environment :
2023-07-14 06:18:09 -05:00
GCP_KEY :
2023-08-23 02:57:19 -05:00
from_secret : gcp_grafanauploads_base64
2023-07-14 06:18:09 -05:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
image : grafana/grafana-ci-deploy:1.3.3
name : publish-artifacts
2021-11-24 04:20:11 -06:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts static-assets --tag ${DRONE_TAG} --static-asset-editions=grafana-oss
2021-11-24 04:20:11 -06:00
depends_on :
2023-07-14 06:18:09 -05:00
- compile-build-cmd
2020-10-07 07:22:15 -05:00
environment :
2022-02-07 03:11:27 -06:00
GCP_KEY :
2023-08-23 02:57:19 -05:00
from_secret : gcp_grafanauploads_base64
2021-11-30 04:53:07 -06:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
2023-07-14 06:18:09 -05:00
STATIC_ASSET_EDITIONS :
from_secret : static_asset_editions
2022-07-20 05:34:09 -05:00
image : grafana/grafana-ci-deploy:1.3.3
2023-07-14 06:18:09 -05:00
name : publish-static-assets
2021-10-14 09:02:45 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts storybook --tag ${DRONE_TAG}
2020-10-07 07:22:15 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- compile-build-cmd
2021-10-14 09:02:45 -05:00
environment :
2022-02-07 03:11:27 -06:00
GCP_KEY :
2023-08-23 02:57:19 -05:00
from_secret : gcp_grafanauploads_base64
2021-11-30 04:53:07 -06:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
2022-07-20 05:34:09 -05:00
image : grafana/grafana-ci-deploy:1.3.3
2023-07-14 06:18:09 -05:00
name : publish-storybook
2020-10-07 07:22:15 -05:00
trigger :
2022-01-11 08:28:29 -06:00
event :
2023-07-14 06:18:09 -05:00
- promote
target :
- public
2021-10-14 09:02:45 -05:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2020-10-07 07:22:15 -05:00
---
2021-10-14 09:02:45 -05:00
clone :
2023-07-14 06:18:09 -05:00
retries : 3
2022-01-11 03:17:00 -06:00
depends_on : [ ]
2022-11-18 08:15:04 -06:00
environment :
2023-07-14 06:18:09 -05:00
EDITION : oss
2021-10-14 09:02:45 -05:00
image_pull_secrets :
- dockerconfigjson
2020-10-07 07:22:15 -05:00
kind : pipeline
2023-07-14 06:18:09 -05:00
name : publish-npm-packages-public
2022-01-11 03:17:00 -06:00
node :
type : no -parallel
2020-10-07 07:22:15 -05:00
platform :
arch : amd64
2022-01-11 03:17:00 -06:00
os : linux
2021-10-14 09:02:45 -05:00
services : [ ]
2020-10-07 07:22:15 -05:00
steps :
2023-04-03 06:04:30 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
2022-10-11 02:05:13 -05:00
environment :
2023-07-14 06:18:09 -05:00
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-14 06:18:09 -05:00
name : compile-build-cmd
2022-01-11 03:17:00 -06:00
- commands :
2022-10-10 10:46:56 -05:00
- yarn install --immutable
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2022-10-10 10:46:56 -05:00
name : yarn-install
2022-04-14 06:56:14 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts npm retrieve --tag ${DRONE_TAG}
2022-04-14 06:56:14 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- compile-build-cmd
2022-10-10 10:46:56 -05:00
- yarn-install
2023-07-14 06:18:09 -05:00
environment :
GCP_KEY :
2023-08-23 02:57:19 -05:00
from_secret : gcp_grafanauploads_base64
2023-07-14 06:18:09 -05:00
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
failure : ignore
image : grafana/grafana-ci-deploy:1.3.3
name : retrieve-npm-packages
2022-04-14 06:56:14 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build artifacts npm release --tag ${DRONE_TAG}
2022-04-14 06:56:14 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- compile-build-cmd
- retrieve-npm-packages
2022-10-10 10:46:56 -05:00
environment :
2023-07-14 06:18:09 -05:00
NPM_TOKEN :
from_secret : npm_token
failure : ignore
2023-10-27 02:20:20 -05:00
image : node:20.9.0-alpine
2023-07-14 06:18:09 -05:00
name : release-npm-packages
2022-10-10 10:46:56 -05:00
trigger :
event :
2023-07-14 06:18:09 -05:00
- promote
target :
- public
2022-10-10 10:46:56 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
2023-07-14 06:18:09 -05:00
retries : 3
depends_on :
- publish-artifacts-public
- publish-docker-public
2022-10-10 10:46:56 -05:00
environment :
2023-07-14 06:18:09 -05:00
EDITION : oss
2022-10-10 10:46:56 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-07-14 06:18:09 -05:00
name : publish-packages
2022-10-10 10:46:56 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
2023-07-14 06:18:09 -05:00
depends_on : [ ]
2022-10-10 10:46:56 -05:00
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2022-10-10 10:46:56 -05:00
name : compile-build-cmd
2023-07-14 06:18:09 -05:00
- depends_on :
- compile-build-cmd
image : us.gcr.io/kubernetes-dev/package-publish:latest
name : publish-linux-packages-deb
privileged : true
settings :
access_key_id :
from_secret : packages_access_key_id
deb_distribution : auto
gpg_passphrase :
from_secret : packages_gpg_passphrase
gpg_private_key :
from_secret : packages_gpg_private_key
gpg_public_key :
from_secret : packages_gpg_public_key
2023-07-26 06:18:00 -05:00
package_path : gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/oss/**.deb
2023-07-14 06:18:09 -05:00
secret_access_key :
from_secret : packages_secret_access_key
service_account_json :
from_secret : packages_service_account
target_bucket : grafana-packages
- depends_on :
- compile-build-cmd
image : us.gcr.io/kubernetes-dev/package-publish:latest
name : publish-linux-packages-rpm
privileged : true
settings :
access_key_id :
from_secret : packages_access_key_id
deb_distribution : auto
gpg_passphrase :
from_secret : packages_gpg_passphrase
gpg_private_key :
from_secret : packages_gpg_private_key
gpg_public_key :
from_secret : packages_gpg_public_key
2023-07-26 06:18:00 -05:00
package_path : gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/oss/**.rpm
2023-07-14 06:18:09 -05:00
secret_access_key :
from_secret : packages_secret_access_key
service_account_json :
from_secret : packages_service_account
target_bucket : grafana-packages
2022-06-09 01:48:27 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- ./bin/build publish grafana-com --edition oss ${DRONE_TAG}
2022-01-11 03:17:00 -06:00
depends_on :
2023-07-14 06:18:09 -05:00
- publish-linux-packages-deb
- publish-linux-packages-rpm
environment :
GCP_KEY :
2023-07-26 08:59:25 -05:00
from_secret : gcp_grafanauploads_base64
2023-07-14 06:18:09 -05:00
GRAFANA_COM_API_KEY :
from_secret : grafana_api_key
image : grafana/grafana-ci-deploy:1.3.3
name : publish-grafanacom
2020-10-07 07:22:15 -05:00
trigger :
2022-01-11 08:28:29 -06:00
event :
2023-07-14 06:18:09 -05:00
- promote
target :
- public
2021-10-14 09:02:45 -05:00
type : docker
2021-11-24 04:20:11 -06:00
volumes :
2021-11-30 04:53:07 -06:00
- host :
path : /var/run/docker.sock
name : docker
2021-10-14 09:02:45 -05:00
---
2023-10-04 11:55:43 -05:00
clone :
retries : 3
depends_on :
- main-test-backend
- main-test-frontend
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : rgm-main-prerelease
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- export GRAFANA_DIR=$$(pwd)
2023-10-23 18:14:12 -05:00
- cd /src && ./scripts/drone_build_main.sh
2023-10-04 11:55:43 -05:00
environment :
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
2023-10-31 15:52:09 -05:00
ALPINE_BASE : alpine:3.18.4
2023-10-04 11:55:43 -05:00
CDN_DESTINATION :
from_secret : rgm_cdn_destination
DESTINATION :
from_secret : destination
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-10-04 11:55:43 -05:00
GCP_KEY_BASE64 :
from_secret : gcp_key_base64
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
GO_VERSION : 1.21 .5
2023-10-04 11:55:43 -05:00
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
2023-10-31 15:52:09 -05:00
UBUNTU_BASE : ubuntu:22.04
2023-10-04 11:55:43 -05:00
image : grafana/grafana-build:main
name : rgm-build
pull : always
volumes :
- name : docker
path : /var/run/docker.sock
trigger :
branch : main
event :
- push
paths :
exclude :
- '*.md'
- docs/**
- packages/**/*.md
- latest.json
repo :
- grafana/grafana
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-01-11 03:17:00 -06:00
clone :
2023-07-14 06:18:09 -05:00
retries : 3
2023-07-28 09:58:22 -05:00
depends_on : [ ]
environment :
EDITION : oss
2022-10-10 10:46:56 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-07-28 09:58:22 -05:00
name : release-whatsnew-checker
2023-07-14 06:18:09 -05:00
node :
type : no -parallel
2023-04-03 05:43:37 -05:00
platform :
arch : amd64
2023-07-14 06:18:09 -05:00
os : linux
2023-04-03 05:43:37 -05:00
services : [ ]
steps :
- commands :
2023-07-28 09:58:22 -05:00
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
depends_on : [ ]
environment :
CGO_ENABLED : 0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : compile-build-cmd
- commands :
- ./bin/build whatsnew-checker
2023-04-03 05:43:37 -05:00
depends_on :
2023-07-28 09:58:22 -05:00
- compile-build-cmd
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : whats-new-checker
trigger :
event :
exclude :
- promote
ref :
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : release-test-frontend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-07-28 09:58:22 -05:00
name : identify-runner
- commands :
- yarn install --immutable
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-07-28 09:58:22 -05:00
name : yarn-install
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update git bash
2023-07-28 09:58:22 -05:00
- yarn betterer ci
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-07-28 09:58:22 -05:00
name : betterer-frontend
- commands :
- yarn run ci:test-frontend
depends_on :
- yarn-install
2023-04-03 05:43:37 -05:00
environment :
2023-07-28 09:58:22 -05:00
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-07-28 09:58:22 -05:00
name : test-frontend
trigger :
event :
exclude :
- promote
ref :
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : release-test-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-07-28 09:58:22 -05:00
name : identify-runner
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-28 09:58:22 -05:00
- CODEGEN_VERIFY=1 make gen-cue
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : verify-gen-cue
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-28 09:58:22 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : verify-gen-jsonnet
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-07-28 09:58:22 -05:00
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : wire-install
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base shared-mime-info shared-mime-info-lang
2023-07-28 09:58:22 -05:00
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
depends_on :
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : test-backend
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
2023-07-28 09:58:22 -05:00
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
depends_on :
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-07-28 09:58:22 -05:00
name : test-backend-integration
2023-04-03 05:43:37 -05:00
trigger :
event :
exclude :
- promote
ref :
2023-04-03 08:22:20 -05:00
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
2023-04-03 05:43:37 -05:00
type : docker
volumes :
- host :
2023-07-14 06:18:09 -05:00
path : /var/run/docker.sock
2023-04-03 05:43:37 -05:00
name : docker
---
clone :
2023-07-14 06:18:09 -05:00
retries : 3
depends_on :
2023-10-04 11:55:43 -05:00
- release-test-backend
- release-test-frontend
2023-04-03 05:43:37 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-10-04 11:55:43 -05:00
name : rgm-tag-prerelease
2022-10-10 10:46:56 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
2023-04-03 05:43:37 -05:00
services : [ ]
2020-10-07 07:22:15 -05:00
steps :
2021-11-15 11:14:33 -06:00
- commands :
2023-07-14 06:18:09 -05:00
- export GRAFANA_DIR=$$(pwd)
2023-10-23 18:14:12 -05:00
- cd /src && ./scripts/drone_build_tag_grafana.sh
2021-10-14 09:02:45 -05:00
environment :
2023-07-14 06:18:09 -05:00
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
2023-10-31 15:52:09 -05:00
ALPINE_BASE : alpine:3.18.4
2023-10-04 11:55:43 -05:00
CDN_DESTINATION :
from_secret : rgm_cdn_destination
2023-07-14 06:18:09 -05:00
DESTINATION :
from_secret : destination
2023-10-04 11:55:43 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-07-14 06:18:09 -05:00
GCP_KEY_BASE64 :
from_secret : gcp_key_base64
2022-01-11 03:17:00 -06:00
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
GO_VERSION : 1.21 .5
2023-07-14 06:18:09 -05:00
GPG_PASSPHRASE :
2023-01-19 09:30:05 -06:00
from_secret : packages_gpg_passphrase
2023-07-14 06:18:09 -05:00
GPG_PRIVATE_KEY :
2023-01-19 09:30:05 -06:00
from_secret : packages_gpg_private_key
2023-07-14 06:18:09 -05:00
GPG_PUBLIC_KEY :
2023-01-19 09:30:05 -06:00
from_secret : packages_gpg_public_key
2023-10-04 11:55:43 -05:00
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
2023-10-31 15:52:09 -05:00
UBUNTU_BASE : ubuntu:22.04
2023-07-14 06:18:09 -05:00
image : grafana/grafana-build:main
name : rgm-build
2023-09-12 12:59:02 -05:00
pull : always
2022-11-21 12:06:00 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-07-14 06:18:09 -05:00
trigger :
event :
exclude :
2023-10-04 11:55:43 -05:00
- promote
ref :
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on :
- rgm-tag-prerelease
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : rgm-tag-prerelease-windows
platform :
arch : amd64
os : windows
version : "1809"
services : [ ]
steps :
- commands :
- echo $env:DRONE_RUNNER_NAME
image : mcr.microsoft.com/windows:1809
name : identify-runner
- commands :
- $$ProgressPreference = "SilentlyContinue"
2023-12-20 09:07:55 -06:00
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/windows/grabpl.exe
2023-10-04 11:55:43 -05:00
-OutFile grabpl.exe
image : grafana/ci-wix:0.1.1
name : windows-init
- commands :
- $$gcpKey = $$env:GCP_KEY
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
> gcpkey.json'
- dos2unix gcpkey.json
- gcloud auth activate-service-account --key-file=gcpkey.json
- rm gcpkey.json
- cp C:\App\nssm-2.24.zip .
- .\grabpl.exe windows-installer --target gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/grafana-${DRONE_TAG:1}.windows-amd64.zip
--edition oss ${DRONE_TAG}
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
- gsutil cp $$fname gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
- gsutil cp "$$fname.sha256" gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
depends_on :
- windows-init
environment :
GCP_KEY :
from_secret : gcp_grafanauploads_base64
GITHUB_TOKEN :
from_secret : github_token
PRERELEASE_BUCKET :
from_secret : prerelease_bucket
image : grafana/ci-wix:0.1.1
name : build-windows-installer
trigger :
event :
exclude :
- promote
ref :
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
type : docker
volumes :
- host :
path : //./pipe/docker_engine/
name : docker
---
clone :
retries : 3
depends_on :
- rgm-tag-prerelease
- rgm-tag-prerelease-windows
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : rgm-tag-verify-prerelease-assets
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json
- ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
- '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on :
- clone
environment :
BUCKET : grafana-prerelease
GCP_KEY :
from_secret : gcp_key_base64
image : google/cloud-sdk:431.0.0
name : gsutil-stat
trigger :
event :
exclude :
- promote
ref :
exclude :
- refs/tags/*-cloud*
include :
- refs/tags/v*
2023-07-14 06:18:09 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
2023-07-28 09:58:22 -05:00
depends_on :
- release-test-backend
- release-test-frontend
2023-07-14 06:18:09 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-10-04 11:55:43 -05:00
name : rgm-version-branch-prerelease
2023-07-14 06:18:09 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
2022-11-21 12:06:00 -06:00
- commands :
2023-07-14 06:18:09 -05:00
- export GRAFANA_DIR=$$(pwd)
2023-10-23 18:14:12 -05:00
- cd /src && ./scripts/drone_build_tag_grafana.sh
2022-11-21 12:06:00 -06:00
environment :
2023-07-14 06:18:09 -05:00
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
2023-10-31 15:52:09 -05:00
ALPINE_BASE : alpine:3.18.4
2023-10-04 11:55:43 -05:00
CDN_DESTINATION :
from_secret : rgm_cdn_destination
2023-07-14 06:18:09 -05:00
DESTINATION :
from_secret : destination
2023-10-04 11:55:43 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-07-14 06:18:09 -05:00
GCP_KEY_BASE64 :
from_secret : gcp_key_base64
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
GO_VERSION : 1.21 .5
2023-07-14 06:18:09 -05:00
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
2023-10-04 11:55:43 -05:00
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
2023-10-31 15:52:09 -05:00
UBUNTU_BASE : ubuntu:22.04
2023-07-14 06:18:09 -05:00
image : grafana/grafana-build:main
name : rgm-build
2023-09-12 12:59:02 -05:00
pull : always
2022-11-21 12:06:00 -06:00
volumes :
- name : docker
path : /var/run/docker.sock
trigger :
ref :
2023-10-04 11:55:43 -05:00
- refs/heads/v[0-9]*
2022-11-21 12:06:00 -06:00
type : docker
volumes :
2022-01-11 08:28:29 -06:00
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2023-07-14 06:18:09 -05:00
depends_on :
2023-10-04 11:55:43 -05:00
- rgm-version-branch-prerelease
2023-07-14 15:27:07 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-10-04 11:55:43 -05:00
name : rgm-prerelease-verify-prerelease-assets
node :
type : no -parallel
2023-07-14 15:27:07 -05:00
platform :
arch : amd64
2023-10-04 11:55:43 -05:00
os : linux
2023-07-14 15:27:07 -05:00
services : [ ]
steps :
- commands :
2023-10-04 11:55:43 -05:00
- apt-get update && apt-get install -yq gettext
- printenv GCP_KEY | base64 -d > /tmp/key.json
- gcloud auth activate-service-account --key-file=/tmp/key.json
- ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
- '! cat /tmp/stat.log | grep "No URLs matched"'
depends_on :
- clone
environment :
BUCKET : grafana-prerelease
GCP_KEY :
from_secret : gcp_key_base64
image : google/cloud-sdk:431.0.0
name : gsutil-stat
trigger :
ref :
- refs/heads/v[0-9]*
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : nightly-test-frontend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-10-04 11:55:43 -05:00
name : identify-runner
- commands :
- yarn install --immutable
depends_on : [ ]
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-10-04 11:55:43 -05:00
name : yarn-install
- commands :
- apk add --update git bash
- yarn betterer ci
depends_on :
- yarn-install
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-10-04 11:55:43 -05:00
name : betterer-frontend
- commands :
- yarn run ci:test-frontend
depends_on :
- yarn-install
environment :
TEST_MAX_WORKERS : 50 %
2023-10-26 02:34:50 -05:00
image : node:20.9.0-alpine
2023-10-04 11:55:43 -05:00
name : test-frontend
trigger :
cron :
include :
2023-10-05 00:44:24 -05:00
- nightly-release
2023-10-04 11:55:43 -05:00
event :
include :
- cron
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
clone :
retries : 3
depends_on : [ ]
environment :
EDITION : oss
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : nightly-test-backend
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-10-04 11:55:43 -05:00
name : identify-runner
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- apk add --update make
- CODEGEN_VERIFY=1 make gen-cue
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-04 11:55:43 -05:00
name : verify-gen-cue
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- apk add --update make
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-04 11:55:43 -05:00
name : verify-gen-jsonnet
- commands :
- apk add --update make
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-04 11:55:43 -05:00
name : wire-install
2023-07-14 15:27:07 -05:00
- commands :
2023-10-04 11:55:43 -05:00
- apk add --update build-base shared-mime-info shared-mime-info-lang
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
depends_on :
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-04 11:55:43 -05:00
name : test-backend
2023-07-14 15:27:07 -05:00
- commands :
2023-10-04 11:55:43 -05:00
- apk add --update build-base
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2023-07-14 15:27:07 -05:00
depends_on :
2023-10-04 11:55:43 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-04 11:55:43 -05:00
name : test-backend-integration
2023-07-18 15:09:08 -05:00
trigger :
2023-10-04 11:55:43 -05:00
cron :
include :
2023-10-05 00:44:24 -05:00
- nightly-release
2023-07-18 15:09:08 -05:00
event :
include :
2023-10-04 11:55:43 -05:00
- cron
2023-07-18 15:09:08 -05:00
type : docker
volumes :
- host :
2023-10-04 11:55:43 -05:00
path : /var/run/docker.sock
2023-07-18 15:09:08 -05:00
name : docker
---
clone :
retries : 3
depends_on :
2023-10-04 11:55:43 -05:00
- nightly-test-backend
- nightly-test-frontend
2023-09-12 10:19:06 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-10-04 11:55:43 -05:00
name : rgm-nightly-build
2023-09-12 10:19:06 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
- export GRAFANA_DIR=$$(pwd)
2023-10-04 11:55:43 -05:00
- cd /src && ./scripts/drone_build_nightly_grafana.sh
2023-09-12 10:19:06 -05:00
environment :
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
2023-10-31 15:52:09 -05:00
ALPINE_BASE : alpine:3.18.4
2023-10-04 11:55:43 -05:00
CDN_DESTINATION :
from_secret : rgm_cdn_destination
2023-09-12 10:19:06 -05:00
DESTINATION :
from_secret : destination
2023-10-04 11:55:43 -05:00
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-09-12 10:19:06 -05:00
GCP_KEY_BASE64 :
from_secret : gcp_key_base64
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
GO_VERSION : 1.21 .5
2023-09-12 10:19:06 -05:00
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
2023-10-04 11:55:43 -05:00
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
2023-10-31 15:52:09 -05:00
UBUNTU_BASE : ubuntu:22.04
2023-09-12 10:19:06 -05:00
image : grafana/grafana-build:main
name : rgm-build
2023-09-12 12:59:02 -05:00
pull : always
2023-09-12 10:19:06 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2022-12-05 08:49:33 -06:00
- commands :
2023-10-04 11:55:43 -05:00
- mkdir -p $${DESTINATION}/$${DRONE_BUILD_EVENT}
- printenv GCP_KEY_BASE64 | base64 -d > /tmp/key.json
2023-07-14 06:18:09 -05:00
- gcloud auth activate-service-account --key-file=/tmp/key.json
2023-10-04 11:55:43 -05:00
- gcloud storage cp -r $${DRONE_WORKSPACE}/dist/* $${DESTINATION}/$${DRONE_BUILD_EVENT}
2022-01-11 08:28:29 -06:00
depends_on :
2023-10-04 11:55:43 -05:00
- rgm-build
2022-01-11 08:28:29 -06:00
environment :
2023-10-04 11:55:43 -05:00
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
CDN_DESTINATION :
from_secret : rgm_cdn_destination
DESTINATION :
from_secret : destination
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-10-04 11:55:43 -05:00
GCP_KEY_BASE64 :
2023-08-22 08:06:22 -05:00
from_secret : gcp_key_base64
2023-10-04 11:55:43 -05:00
GITHUB_TOKEN :
from_secret : github_token
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
image : google/cloud-sdk:alpine
name : rgm-copy
2022-01-11 08:28:29 -06:00
trigger :
2023-10-04 11:55:43 -05:00
cron :
include :
2023-10-05 00:44:24 -05:00
- nightly-release
2022-01-11 08:28:29 -06:00
event :
2023-07-14 06:18:09 -05:00
include :
2023-10-04 11:55:43 -05:00
- cron
2022-01-11 08:28:29 -06:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2023-09-12 10:19:06 -05:00
clone :
retries : 3
depends_on :
2023-10-04 11:55:43 -05:00
- rgm-nightly-build
2023-09-12 10:19:06 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-10-04 11:55:43 -05:00
name : rgm-nightly-publish
2023-09-12 10:19:06 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services : [ ]
steps :
- commands :
2023-10-04 11:55:43 -05:00
- mkdir -p $${DRONE_WORKSPACE}/dist
- printenv GCP_KEY_BASE64 | base64 -d > /tmp/key.json
2023-09-12 10:19:06 -05:00
- gcloud auth activate-service-account --key-file=/tmp/key.json
2023-10-04 11:55:43 -05:00
- gcloud storage cp -r $${DESTINATION}/$${DRONE_BUILD_EVENT}/*_$${DRONE_BUILD_NUMBER}_*
$${DRONE_WORKSPACE}/dist
environment :
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
CDN_DESTINATION :
from_secret : rgm_cdn_destination
DESTINATION :
from_secret : destination
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-10-04 11:55:43 -05:00
GCP_KEY_BASE64 :
from_secret : gcp_key_base64
GITHUB_TOKEN :
from_secret : github_token
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
image : google/cloud-sdk:alpine
name : rgm-copy
- commands :
- export GRAFANA_DIR=$$(pwd)
- cd /src && ./scripts/drone_publish_nightly_grafana.sh
2023-09-12 10:19:06 -05:00
depends_on :
2023-10-04 11:55:43 -05:00
- rgm-copy
2023-09-12 10:19:06 -05:00
environment :
2023-10-04 11:55:43 -05:00
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN :
from_secret : dagger_token
2023-10-31 15:52:09 -05:00
ALPINE_BASE : alpine:3.18.4
2023-10-04 11:55:43 -05:00
CDN_DESTINATION :
from_secret : rgm_cdn_destination
DESTINATION :
from_secret : destination
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
DOWNLOADS_DESTINATION :
from_secret : rgm_downloads_destination
GCOM_API_KEY :
2023-10-09 10:55:15 -05:00
from_secret : grafana_api_key
2023-10-04 11:55:43 -05:00
GCP_KEY_BASE64 :
2023-09-12 10:19:06 -05:00
from_secret : gcp_key_base64
2023-10-04 11:55:43 -05:00
GITHUB_TOKEN :
from_secret : github_token
2023-12-15 03:36:49 -06:00
GO_VERSION : 1.21 .5
2023-10-04 11:55:43 -05:00
GPG_PASSPHRASE :
from_secret : packages_gpg_passphrase
GPG_PRIVATE_KEY :
from_secret : packages_gpg_private_key
GPG_PUBLIC_KEY :
from_secret : packages_gpg_public_key
NPM_TOKEN :
from_secret : npm_token
STORYBOOK_DESTINATION :
from_secret : rgm_storybook_destination
2023-10-31 15:52:09 -05:00
UBUNTU_BASE : ubuntu:22.04
2023-10-04 11:55:43 -05:00
image : grafana/grafana-build:main
name : rgm-publish
pull : always
volumes :
- name : docker
path : /var/run/docker.sock
- depends_on :
- rgm-publish
image : us.gcr.io/kubernetes-dev/package-publish:latest
name : publish-deb
privileged : true
settings :
access_key_id :
from_secret : packages_access_key_id
gpg_passphrase :
from_secret : packages_gpg_passphrase
gpg_private_key :
from_secret : packages_gpg_private_key
gpg_public_key :
from_secret : packages_gpg_public_key
package_path : file:///drone/src/dist/*.deb
secret_access_key :
from_secret : packages_secret_access_key
service_account_json :
from_secret : packages_service_account
2023-10-09 10:55:15 -05:00
target_bucket : grafana-packages
2023-10-04 11:55:43 -05:00
- depends_on :
- rgm-publish
image : us.gcr.io/kubernetes-dev/package-publish:latest
name : publish-rpm
privileged : true
settings :
access_key_id :
from_secret : packages_access_key_id
gpg_passphrase :
from_secret : packages_gpg_passphrase
gpg_private_key :
from_secret : packages_gpg_private_key
gpg_public_key :
from_secret : packages_gpg_public_key
package_path : file:///drone/src/dist/*.rpm
secret_access_key :
from_secret : packages_secret_access_key
service_account_json :
from_secret : packages_service_account
2023-10-09 10:55:15 -05:00
target_bucket : grafana-packages
2023-09-12 10:19:06 -05:00
trigger :
2023-10-04 11:55:43 -05:00
cron :
include :
2023-10-05 00:44:24 -05:00
- nightly-release
2023-10-04 11:55:43 -05:00
event :
include :
- cron
2023-09-12 10:19:06 -05:00
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
2023-07-14 06:18:09 -05:00
disable : true
2022-01-11 08:28:29 -06:00
depends_on : [ ]
2022-12-12 08:51:27 -06:00
environment :
2023-07-14 06:18:09 -05:00
EDITION : oss
2022-12-12 08:51:27 -06:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-07-14 06:18:09 -05:00
name : testing-test-backend-windows
2022-12-12 08:51:27 -06:00
platform :
arch : amd64
2023-07-14 06:18:09 -05:00
os : windows
version : "1809"
2022-12-12 08:51:27 -06:00
services : [ ]
steps :
- commands :
2023-07-14 06:18:09 -05:00
- git clone "https://$$env:GITHUB_TOKEN@github.com/$$env:DRONE_REPO.git" .
- git checkout -f $$env:DRONE_COMMIT
2022-10-19 03:23:12 -05:00
environment :
GITHUB_TOKEN :
from_secret : github_token
2023-07-14 06:18:09 -05:00
image : grafana/ci-wix:0.1.1
name : clone
- commands : [ ]
2022-01-11 03:17:00 -06:00
depends_on :
2023-07-14 06:18:09 -05:00
- clone
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-windowsservercore-1809
2023-07-14 06:18:09 -05:00
name : windows-init
2022-04-14 06:56:14 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- go install github.com/google/wire/cmd/wire@v0.5.0
- wire gen -tags oss ./pkg/server
2022-04-14 06:56:14 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- windows-init
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-windowsservercore-1809
2023-07-14 06:18:09 -05:00
name : wire-install
2022-04-14 06:56:14 -05:00
- commands :
2023-07-14 06:18:09 -05:00
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
2022-04-14 06:56:14 -05:00
depends_on :
2023-07-14 06:18:09 -05:00
- wire-install
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-windowsservercore-1809
2023-07-14 06:18:09 -05:00
name : test-backend
2022-10-10 10:46:56 -05:00
trigger :
2023-07-14 06:18:09 -05:00
event :
- promote
target :
- test-windows
2022-10-10 10:46:56 -05:00
type : docker
volumes :
- host :
2023-07-14 06:18:09 -05:00
path : //./pipe/docker_engine/
2022-10-10 10:46:56 -05:00
name : docker
---
clone :
2023-07-14 06:18:09 -05:00
retries : 3
2022-10-10 10:46:56 -05:00
depends_on : [ ]
environment :
2023-07-14 06:18:09 -05:00
EDITION : oss
2022-10-10 10:46:56 -05:00
image_pull_secrets :
- dockerconfigjson
kind : pipeline
2023-09-12 10:19:06 -05:00
name : integration-tests
2023-04-03 05:43:37 -05:00
node :
type : no -parallel
platform :
arch : amd64
os : linux
services :
- environment :
PGDATA : /var/lib/postgresql/data/pgdata
POSTGRES_DB : grafanatest
POSTGRES_PASSWORD : grafanatest
POSTGRES_USER : grafanatest
image : postgres:12.3-alpine
name : postgres
volumes :
- name : postgres
path : /var/lib/postgresql/data/pgdata
2023-06-14 18:00:45 -05:00
- commands :
- docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment :
2023-04-03 05:43:37 -05:00
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:5.7.39
2023-05-04 12:42:48 -05:00
name : mysql57
2023-04-03 05:43:37 -05:00
volumes :
2023-05-04 12:42:48 -05:00
- name : mysql57
path : /var/lib/mysql
- commands :
- docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password
environment :
MYSQL_DATABASE : grafana_tests
MYSQL_PASSWORD : password
MYSQL_ROOT_PASSWORD : rootpass
MYSQL_USER : grafana
image : mysql:8.0.32
name : mysql80
volumes :
- name : mysql80
2023-04-03 05:43:37 -05:00
path : /var/lib/mysql
2023-10-05 13:09:26 -05:00
- commands :
- /bin/mimir -target=backend
environment : {}
2023-11-23 10:59:36 -06:00
image : us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-10-17 05:21:45 -05:00
name : mimir_backend
2023-04-05 03:55:55 -05:00
- environment : {}
image : redis:6.2.11-alpine
name : redis
- environment : {}
image : memcached:1.6.9-alpine
name : memcached
2023-04-03 05:43:37 -05:00
steps :
- commands :
- mkdir -p bin
2023-12-20 09:07:55 -06:00
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.47/grabpl
2023-04-03 05:43:37 -05:00
- chmod +x bin/grabpl
image : byrnedo/alpine-curl:0.1.8
name : grabpl
- commands :
- echo $DRONE_RUNNER_NAME
2023-10-31 15:52:09 -05:00
image : alpine:3.18.4
2023-04-03 05:43:37 -05:00
name : identify-runner
- commands :
- '# It is required that code generated from Thema/CUE be committed and in sync
with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-04-03 05:43:37 -05:00
- CODEGEN_VERIFY=1 make gen-cue
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : verify-gen-cue
- commands :
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-04-03 05:43:37 -05:00
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on : [ ]
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : verify-gen-jsonnet
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update make
2023-04-03 05:43:37 -05:00
- make gen-go
depends_on :
- verify-gen-cue
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : wire-install
- commands :
- dockerize -wait tcp://postgres:5432 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-postgres
2023-07-14 06:18:09 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- apk add --update build-base
- apk add --update postgresql-client
2023-04-03 05:43:37 -05:00
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2023-04-03 05:43:37 -05:00
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-postgres
2023-04-03 05:43:37 -05:00
environment :
GRAFANA_TEST_DB : postgres
PGPASSWORD : grafanatest
POSTGRES_HOST : postgres
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : postgres-integration-tests
- commands :
2023-05-04 12:42:48 -05:00
- dockerize -wait tcp://mysql57:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-5.7
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql57 -P 3306 -u root
-prootpass
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-5.7
2023-05-04 12:42:48 -05:00
environment :
GRAFANA_TEST_DB : mysql
MYSQL_HOST : mysql57
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-5.7-integration-tests
- commands :
- dockerize -wait tcp://mysql80:3306 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-mysql-8.0
- commands :
- apk add --update build-base
- apk add --update mysql-client
2023-05-04 12:42:48 -05:00
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
2023-04-03 05:43:37 -05:00
-prootpass
- go clean -testcache
2023-04-17 11:33:43 -05:00
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
| grep -o '\(.*\)/' | sort -u)
2023-04-03 05:43:37 -05:00
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-mysql-8.0
2023-04-03 05:43:37 -05:00
environment :
GRAFANA_TEST_DB : mysql
2023-05-04 12:42:48 -05:00
MYSQL_HOST : mysql80
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-05-04 12:42:48 -05:00
name : mysql-8.0-integration-tests
2023-04-03 05:43:37 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- dockerize -wait tcp://redis:6379 -timeout 120s
image : jwilder/dockerize:0.6.1
name : wait-for-redis
- commands :
- apk add --update build-base
2023-04-03 05:43:37 -05:00
- go clean -testcache
2023-04-05 03:55:55 -05:00
- go test -run IntegrationRedis -covermode=atomic -timeout=2m ./pkg/...
2023-04-03 05:43:37 -05:00
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-redis
2023-04-03 05:43:37 -05:00
environment :
REDIS_URL : redis://redis:6379/0
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : redis-integration-tests
- commands :
- dockerize -wait tcp://memcached:11211 -timeout 120s
2023-09-12 10:19:06 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-memcached
- commands :
- apk add --update build-base
2023-04-03 05:43:37 -05:00
- go clean -testcache
2023-04-05 03:55:55 -05:00
- go test -run IntegrationMemcached -covermode=atomic -timeout=2m ./pkg/...
2023-04-03 05:43:37 -05:00
depends_on :
- wire-install
2023-09-12 10:19:06 -05:00
- wait-for-memcached
2023-04-03 05:43:37 -05:00
environment :
MEMCACHED_HOSTS : memcached:11211
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-04-03 05:43:37 -05:00
name : memcached-integration-tests
2023-10-05 13:09:26 -05:00
- commands :
2023-10-17 05:21:45 -05:00
- dockerize -wait tcp://mimir_backend:8080 -timeout 120s
2023-10-05 13:09:26 -05:00
image : jwilder/dockerize:0.6.1
name : wait-for-remote-alertmanager
- commands :
- apk add --update build-base
- go clean -testcache
2023-11-22 12:13:04 -06:00
- go test -run TestIntegrationRemoteAlertmanager -covermode=atomic -timeout=2m ./pkg/services/ngalert/...
2023-10-05 13:09:26 -05:00
depends_on :
- wire-install
- wait-for-remote-alertmanager
2023-10-17 05:21:45 -05:00
environment :
AM_TENANT_ID : test
AM_URL : http://mimir_backend:8080
2023-12-15 03:36:49 -06:00
image : golang:1.21.5-alpine3.18
2023-10-05 13:09:26 -05:00
name : remote-alertmanager-integration-tests
2023-04-03 05:43:37 -05:00
trigger :
event :
- promote
target : integration-tests
type : docker
volumes :
- host :
path : /var/run/docker.sock
name : docker
- name : postgres
temp :
medium : memory
2023-05-04 12:42:48 -05:00
- name : mysql57
temp :
medium : memory
- name : mysql80
2023-04-03 05:43:37 -05:00
temp :
medium : memory
---
2023-05-08 08:22:34 -05:00
clone :
disable : true
depends_on : [ ]
image_pull_secrets :
- dockerconfigjson
kind : pipeline
name : publish-ci-windows-test-image
platform :
arch : amd64
os : windows
version : "1809"
services : [ ]
steps :
- commands :
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-ci-sandbox.git"
.
- git checkout -f $$env:DRONE_COMMIT
environment :
GITHUB_TOKEN :
from_secret : github_token
image : grafana/ci-wix:0.1.1
name : clone
- commands :
- cd scripts\build\ci-windows-test
- docker login -u $$env:DOCKER_USERNAME -p $$env:DOCKER_PASSWORD
- docker build -t grafana/grafana-ci-windows-test:$$env:TAG .
- docker push grafana/grafana-ci-windows-test:$$env:TAG
environment :
DOCKER_PASSWORD :
from_secret : docker_password
DOCKER_USERNAME :
from_secret : docker_username
image : docker:windowsservercore-1809
name : build-and-publish
volumes :
- name : docker
path : //./pipe/docker_engine/
trigger :
event :
- promote
target :
- ci-windows-test-image
type : docker
volumes :
- host :
path : //./pipe/docker_engine/
name : docker
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-05-26 07:27:40 -05:00
kind : pipeline
2021-11-23 04:43:00 -06:00
name : scan-grafana/grafana:latest-image
2021-05-26 07:27:40 -05:00
platform :
arch : amd64
2021-10-14 09:02:45 -05:00
os : linux
2021-05-26 07:27:40 -05:00
steps :
2023-08-28 06:52:08 -05:00
- commands :
- echo $${GCR_CREDENTIALS} | docker login -u _json_key --password-stdin https://us.gcr.io
environment :
GCR_CREDENTIALS :
from_secret : gcr_credentials
image : docker:dind
name : authenticate-gcr
volumes :
- name : docker
path : /var/run/docker.sock
2023-08-29 02:54:04 -05:00
- name : config
path : /root/.docker/
2021-10-14 09:02:45 -05:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
2023-06-12 08:41:18 -05:00
name : scan-unknown-low-medium-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-10-14 09:02:45 -05:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-09-01 05:31:28 -05:00
environment :
GOOGLE_APPLICATION_CREDENTIALS :
from_secret : gcr_credentials_json
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
name : scan-high-critical-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- image : plugins/slack
name : slack-notify-failure
settings :
channel : grafana-backend-ops
template: 'Nightly docker image scan job for grafana/grafana:latest failed : {{build.link}}'
webhook :
from_secret : slack_webhook_backend
when :
status : failure
trigger :
cron : nightly
event : cron
type : docker
2023-08-28 06:52:08 -05:00
volumes :
- host :
path : /var/run/docker.sock
name : docker
2023-09-01 05:31:28 -05:00
- name : config
temp : {}
2021-11-23 04:43:00 -06:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-11-23 04:43:00 -06:00
kind : pipeline
name : scan-grafana/grafana:main-image
platform :
arch : amd64
os : linux
steps :
2023-08-28 06:52:08 -05:00
- commands :
- echo $${GCR_CREDENTIALS} | docker login -u _json_key --password-stdin https://us.gcr.io
environment :
GCR_CREDENTIALS :
from_secret : gcr_credentials
image : docker:dind
name : authenticate-gcr
volumes :
- name : docker
path : /var/run/docker.sock
2023-08-29 02:54:04 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
2023-06-12 08:41:18 -05:00
name : scan-unknown-low-medium-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-09-01 05:31:28 -05:00
environment :
GOOGLE_APPLICATION_CREDENTIALS :
from_secret : gcr_credentials_json
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
name : scan-high-critical-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- image : plugins/slack
name : slack-notify-failure
settings :
channel : grafana-backend-ops
template: 'Nightly docker image scan job for grafana/grafana:main failed : {{build.link}}'
webhook :
from_secret : slack_webhook_backend
when :
status : failure
trigger :
cron : nightly
event : cron
type : docker
2023-08-28 06:52:08 -05:00
volumes :
- host :
path : /var/run/docker.sock
name : docker
2023-09-01 05:31:28 -05:00
- name : config
temp : {}
2021-11-23 04:43:00 -06:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-11-23 04:43:00 -06:00
kind : pipeline
name : scan-grafana/grafana:latest-ubuntu-image
platform :
arch : amd64
os : linux
steps :
2023-08-28 06:52:08 -05:00
- commands :
- echo $${GCR_CREDENTIALS} | docker login -u _json_key --password-stdin https://us.gcr.io
environment :
GCR_CREDENTIALS :
from_secret : gcr_credentials
image : docker:dind
name : authenticate-gcr
volumes :
- name : docker
path : /var/run/docker.sock
2023-08-29 02:54:04 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest-ubuntu
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
2023-06-12 08:41:18 -05:00
name : scan-unknown-low-medium-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest-ubuntu
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-09-01 05:31:28 -05:00
environment :
GOOGLE_APPLICATION_CREDENTIALS :
from_secret : gcr_credentials_json
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
name : scan-high-critical-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- image : plugins/slack
name : slack-notify-failure
settings :
channel : grafana-backend-ops
template : 'Nightly docker image scan job for grafana/grafana:latest-ubuntu failed :
{{build.link}}'
webhook :
from_secret : slack_webhook_backend
when :
status : failure
trigger :
cron : nightly
event : cron
type : docker
2023-08-28 06:52:08 -05:00
volumes :
- host :
path : /var/run/docker.sock
name : docker
2023-09-01 05:31:28 -05:00
- name : config
temp : {}
2021-11-23 04:43:00 -06:00
---
2022-08-03 06:51:29 -05:00
clone :
retries : 3
2021-11-23 04:43:00 -06:00
kind : pipeline
name : scan-grafana/grafana:main-ubuntu-image
platform :
arch : amd64
os : linux
steps :
2023-08-28 06:52:08 -05:00
- commands :
- echo $${GCR_CREDENTIALS} | docker login -u _json_key --password-stdin https://us.gcr.io
environment :
GCR_CREDENTIALS :
from_secret : gcr_credentials
image : docker:dind
name : authenticate-gcr
volumes :
- name : docker
path : /var/run/docker.sock
2023-08-29 02:54:04 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main-ubuntu
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
2023-06-12 08:41:18 -05:00
name : scan-unknown-low-medium-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-11-23 04:43:00 -06:00
- commands :
2023-09-01 05:31:28 -05:00
- trivy image --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main-ubuntu
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-09-01 05:31:28 -05:00
environment :
GOOGLE_APPLICATION_CREDENTIALS :
from_secret : gcr_credentials_json
2021-11-23 04:43:00 -06:00
image : aquasec/trivy:0.21.0
name : scan-high-critical-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2021-10-14 09:02:45 -05:00
- image : plugins/slack
name : slack-notify-failure
2021-05-31 10:33:22 -05:00
settings :
2021-08-16 07:54:52 -05:00
channel : grafana-backend-ops
2021-11-23 04:43:00 -06:00
template : 'Nightly docker image scan job for grafana/grafana:main-ubuntu failed :
{{build.link}}'
2021-05-31 10:33:22 -05:00
webhook :
2021-06-02 01:49:42 -05:00
from_secret : slack_webhook_backend
2021-05-31 10:33:22 -05:00
when :
2021-10-14 09:02:45 -05:00
status : failure
2021-05-26 07:27:40 -05:00
trigger :
2021-10-14 09:02:45 -05:00
cron : nightly
event : cron
type : docker
2023-08-28 06:52:08 -05:00
volumes :
- host :
path : /var/run/docker.sock
name : docker
2023-09-01 05:31:28 -05:00
- name : config
temp : {}
2021-05-12 08:30:05 -05:00
---
2022-09-27 08:49:20 -05:00
clone :
retries : 3
kind : pipeline
2023-06-12 08:41:18 -05:00
name : scan-build-test-and-publish-docker-images
platform :
arch : amd64
os : linux
steps :
2023-08-28 06:52:08 -05:00
- commands :
- echo $${GCR_CREDENTIALS} | docker login -u _json_key --password-stdin https://us.gcr.io
environment :
GCR_CREDENTIALS :
from_secret : gcr_credentials
image : docker:dind
name : authenticate-gcr
volumes :
- name : docker
path : /var/run/docker.sock
2023-08-29 02:54:04 -05:00
- name : config
path : /root/.docker/
2023-06-12 08:41:18 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine/git:2.40.1
2023-12-15 03:36:49 -06:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM golang:1.21.5-alpine3.18
2023-10-26 02:34:50 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM node:20.9.0-alpine
2023-06-12 08:41:18 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM google/cloud-sdk:431.0.0
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana-ci-deploy:1.3.3
2023-10-31 15:52:09 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.18.4
2023-09-12 12:59:02 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM ubuntu:22.04
2023-06-12 08:41:18 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM byrnedo/alpine-curl:0.1.8
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM plugins/slack
2023-09-12 10:19:06 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM python:3.8
2023-06-12 08:41:18 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM postgres:12.3-alpine
2023-11-23 10:59:36 -06:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-06-12 08:41:18 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM mysql:5.7.39
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM mysql:8.0.32
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM redis:6.2.11-alpine
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM memcached:1.6.9-alpine
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM us.gcr.io/kubernetes-dev/package-publish:latest
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM osixia/openldap:1.4.0
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/drone-downstream
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/docker-puppeteer:1.1.0
2023-10-27 12:30:56 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/docs-base:latest
2023-09-13 05:08:43 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM cypress/included:13.1.0
2023-09-12 10:19:06 -05:00
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM jwilder/dockerize:0.6.1
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM koalaman/shellcheck:stable
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-06-12 08:41:18 -05:00
image : aquasec/trivy:0.21.0
name : scan-unknown-low-medium-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2023-06-12 08:41:18 -05:00
- commands :
2023-09-12 10:19:06 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine/git:2.40.1
2023-12-15 03:36:49 -06:00
- trivy --exit-code 1 --severity HIGH,CRITICAL golang:1.21.5-alpine3.18
2023-10-26 02:34:50 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL node:20.9.0-alpine
2023-06-12 08:41:18 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL google/cloud-sdk:431.0.0
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana-ci-deploy:1.3.3
2023-10-31 15:52:09 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.18.4
2023-09-12 12:59:02 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL ubuntu:22.04
2023-06-12 08:41:18 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL byrnedo/alpine-curl:0.1.8
- trivy --exit-code 1 --severity HIGH,CRITICAL plugins/slack
2023-09-12 10:19:06 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL python:3.8
2023-06-12 08:41:18 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL postgres:12.3-alpine
2023-11-23 10:59:36 -06:00
- trivy --exit-code 1 --severity HIGH,CRITICAL us.gcr.io/kubernetes-dev/mimir:gotjosh-state-config-grafana-663a0ae78
2023-06-12 08:41:18 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL mysql:5.7.39
- trivy --exit-code 1 --severity HIGH,CRITICAL mysql:8.0.32
- trivy --exit-code 1 --severity HIGH,CRITICAL redis:6.2.11-alpine
- trivy --exit-code 1 --severity HIGH,CRITICAL memcached:1.6.9-alpine
- trivy --exit-code 1 --severity HIGH,CRITICAL us.gcr.io/kubernetes-dev/package-publish:latest
- trivy --exit-code 1 --severity HIGH,CRITICAL osixia/openldap:1.4.0
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/drone-downstream
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/docker-puppeteer:1.1.0
2023-10-27 12:30:56 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/docs-base:latest
2023-09-13 05:08:43 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL cypress/included:13.1.0
2023-09-12 10:19:06 -05:00
- trivy --exit-code 1 --severity HIGH,CRITICAL jwilder/dockerize:0.6.1
- trivy --exit-code 1 --severity HIGH,CRITICAL koalaman/shellcheck:stable
2023-08-28 06:52:08 -05:00
depends_on :
- authenticate-gcr
2023-09-01 05:31:28 -05:00
environment :
GOOGLE_APPLICATION_CREDENTIALS :
from_secret : gcr_credentials_json
2023-06-12 08:41:18 -05:00
image : aquasec/trivy:0.21.0
name : scan-high-critical-vulnerabilities
2023-08-28 06:52:08 -05:00
volumes :
- name : docker
path : /var/run/docker.sock
2023-09-01 05:31:28 -05:00
- name : config
path : /root/.docker/
2023-06-12 08:41:18 -05:00
- image : plugins/slack
name : slack-notify-failure
settings :
channel : grafana-backend-ops
template: 'Nightly docker image scan job for build-images failed : {{build.link}}'
webhook :
from_secret : slack_webhook_backend
when :
status : failure
trigger :
cron : nightly
event : cron
type : docker
2023-08-28 06:52:08 -05:00
volumes :
- host :
path : /var/run/docker.sock
name : docker
2023-09-01 05:31:28 -05:00
- name : config
temp : {}
2023-06-12 08:41:18 -05:00
---
2023-07-21 08:53:57 -05:00
get :
name : credentials.json
path : infra/data/ci/grafana-release-eng/grafanauploads
kind : secret
name : gcp_grafanauploads
---
get :
name : credentials_base64
path : infra/data/ci/grafana-release-eng/grafanauploads
kind : secret
name : gcp_grafanauploads_base64
---
2023-07-19 15:40:03 -05:00
get :
2023-08-29 09:21:44 -05:00
name : api_key
path : infra/data/ci/grafana-release-eng/grafanacom
2023-07-19 15:40:03 -05:00
kind : secret
name : grafana_api_key
---
2021-05-12 08:30:05 -05:00
get :
name : .dockerconfigjson
2021-10-14 09:02:45 -05:00
path : secret/data/common/gcr
2021-05-12 08:30:05 -05:00
kind : secret
2021-10-14 09:02:45 -05:00
name : dockerconfigjson
---
2021-05-12 08:30:05 -05:00
get :
name : pat
2021-10-14 09:02:45 -05:00
path : infra/data/ci/github/grafanabot
2021-06-10 05:22:03 -05:00
kind : secret
2021-10-14 09:02:45 -05:00
name : github_token
---
2021-06-10 05:22:03 -05:00
get :
name : machine-user-token
2021-10-14 09:02:45 -05:00
path : infra/data/ci/drone
kind : secret
name : drone_token
2021-08-02 08:35:49 -05:00
---
2021-11-30 04:53:07 -06:00
get :
name : bucket
path : infra/data/ci/grafana/prerelease
kind : secret
name : prerelease_bucket
---
2023-09-07 11:26:43 -05:00
get :
name : username
path : infra/data/ci/grafanaci-docker-hub
kind : secret
name : docker_username
---
get :
name : password
path : infra/data/ci/grafanaci-docker-hub
kind : secret
name : docker_password
---
2021-12-24 03:43:32 -06:00
get :
name : credentials.json
path : infra/data/ci/grafana/releng/artifacts-uploader-service-account
kind : secret
name : gcp_upload_artifacts_key
---
2023-07-11 06:08:05 -05:00
get :
name : credentials.json
path : infra/data/ci/grafana/assets-downloader-build-container-service-account
kind : secret
name : gcp_download_build_container_assets_key
---
2022-11-08 04:27:54 -06:00
get :
name : application_id
path : infra/data/ci/datasources/cpp-azure-resourcemanager-credentials
kind : secret
name : azure_sp_app_id
---
get :
name : application_secret
path : infra/data/ci/datasources/cpp-azure-resourcemanager-credentials
kind : secret
name : azure_sp_app_pw
---
get :
name : tenant_id
path : infra/data/ci/datasources/cpp-azure-resourcemanager-credentials
kind : secret
name : azure_tenant
---
2023-08-17 09:43:26 -05:00
get :
name : token
path : infra/data/ci/grafana-release-eng/npm
kind : secret
name : npm_token
---
2022-09-01 06:13:44 -05:00
get :
2023-01-19 16:03:19 -06:00
name : public-key-b64
2022-09-01 06:13:44 -05:00
path : infra/data/ci/packages-publish/gpg
kind : secret
name : packages_gpg_public_key
---
get :
2023-01-19 16:03:19 -06:00
name : private-key-b64
2022-09-01 06:13:44 -05:00
path : infra/data/ci/packages-publish/gpg
kind : secret
name : packages_gpg_private_key
---
get :
name : passphrase
path : infra/data/ci/packages-publish/gpg
kind : secret
name : packages_gpg_passphrase
---
get :
name : credentials.json
path : infra/data/ci/packages-publish/service-account
kind : secret
name : packages_service_account
---
get :
name : AccessID
path : infra/data/ci/packages-publish/bucket-credentials
kind : secret
name : packages_access_key_id
---
get :
name : Secret
path : infra/data/ci/packages-publish/bucket-credentials
kind : secret
name : packages_secret_access_key
---
2023-03-09 07:07:42 -06:00
get :
name : static_asset_editions
path : infra/data/ci/grafana-release-eng/artifact-publishing
kind : secret
name : static_asset_editions
---
2023-05-03 13:56:02 -05:00
get :
2023-07-28 09:58:22 -05:00
name : gcp_service_account_prod_base64
2023-05-03 13:56:02 -05:00
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : gcp_key_base64
---
get :
2023-07-28 09:58:22 -05:00
name : destination_prod
2023-05-03 13:56:02 -05:00
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : destination
---
2023-10-04 11:55:43 -05:00
get :
name : storybook_destination
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : rgm_storybook_destination
---
get :
name : cdn_destination
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : rgm_cdn_destination
---
get :
name : downloads_destination
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : rgm_downloads_destination
---
2023-05-17 12:19:53 -05:00
get :
name : dagger_token
path : infra/data/ci/grafana-release-eng/rgm
kind : secret
name : dagger_token
---
2023-05-15 08:33:31 -05:00
get :
name : app-id
path : infra/data/ci/grafana-release-eng/grafana-delivery-bot
kind : secret
name : delivery-bot-app-id
---
get :
name : app-installation-id
path : infra/data/ci/grafana-release-eng/grafana-delivery-bot
kind : secret
name : delivery-bot-app-installation-id
---
get :
name : app-private-key
path : infra/data/ci/grafana-release-eng/grafana-delivery-bot
kind : secret
name : delivery-bot-app-private-key
---
2023-08-28 06:52:08 -05:00
get :
name : service-account
path : secret/data/common/gcr
kind : secret
name : gcr_credentials
2023-09-01 08:41:33 -05:00
---
kind : signature
2023-12-20 09:07:55 -06:00
hmac : d7e383e4bf37190a97d695ef8f91755cb8cb70fb8088a5c1f63262adcf8e4f5e
2023-09-01 08:41:33 -05:00
...