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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-07-08 04:18:46 -05:00
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-07-08 04:18:46 -05:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- 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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2021-10-08 09:19:10 -05:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-06-29 09:04:52 -05:00
|
|
|
- commands:
|
|
|
|
- yarn betterer ci
|
|
|
|
depends_on:
|
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-29 09:04:52 -05:00
|
|
|
name: betterer-frontend
|
2022-04-28 04:04:03 -05:00
|
|
|
- commands:
|
|
|
|
- yarn run ci:test-frontend
|
|
|
|
depends_on:
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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:
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 14:39:28 -05:00
|
|
|
name: yarn-install
|
|
|
|
- commands:
|
|
|
|
- yarn run prettier:check
|
|
|
|
- yarn run lint
|
|
|
|
- yarn run i18n:compile
|
|
|
|
- yarn run typecheck
|
|
|
|
depends_on:
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 14:39:28 -05:00
|
|
|
name: lint-frontend
|
|
|
|
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:
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-28 04:04:03 -05:00
|
|
|
name: identify-runner
|
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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-04-28 04:04:03 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-28 04:04:03 -05:00
|
|
|
name: wire-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2021-08-24 10:07:06 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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
|
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
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-21 06:05:19 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 06:05:19 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- apt-get update && apt-get install make
|
|
|
|
- make lint-go
|
|
|
|
depends_on:
|
|
|
|
- wire-install
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: "1"
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-21 06:05:19 -05:00
|
|
|
name: lint-backend
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- docs/**
|
|
|
|
- '*.md'
|
|
|
|
include:
|
|
|
|
- pkg/**
|
|
|
|
- packaging/**
|
|
|
|
- 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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2021-11-17 03:25:55 -06:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-10-11 04:01:18 -05:00
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
--depth=1
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git fetch origin "refs/tags/*:refs/tags/*" --quiet
|
|
|
|
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
|
|
|
|
push --delete origin $${TEST_TAG}; fi
|
|
|
|
- git tag $${TEST_TAG} && git push origin $${TEST_TAG}
|
|
|
|
- cd -
|
|
|
|
- git fetch https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git "refs/tags/*:refs/tags/*"
|
|
|
|
--quiet && git fetch --quiet
|
|
|
|
- if git show-ref --tags $${TEST_TAG} --quiet; then git tag -d $${TEST_TAG} && git
|
|
|
|
push --delete https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git $${TEST_TAG};
|
|
|
|
fi
|
|
|
|
- git tag $${TEST_TAG} && git push https://$${GITHUB_TOKEN}@github.com/grafana/grafana.git
|
|
|
|
$${TEST_TAG}
|
|
|
|
environment:
|
|
|
|
DOWNSTREAM_REPO:
|
|
|
|
from_secret: downstream
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token_pr
|
|
|
|
TEST_TAG: v0.0.0-test
|
|
|
|
failure: ignore
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-11 04:01:18 -05:00
|
|
|
name: trigger-test-release
|
|
|
|
when:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- .drone.yml
|
|
|
|
- pkg/build/**
|
|
|
|
repo:
|
|
|
|
- grafana/grafana
|
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:
|
2022-07-28 09:11:22 -05:00
|
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-backend
|
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
environment: null
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- . scripts/build/gpg-test-vars.sh && ./bin/build package --jobs 8 --edition oss
|
2022-06-15 08:46:47 -05:00
|
|
|
--build-id ${DRONE_BUILD_NUMBER} --variants linux-amd64,linux-amd64-musl,darwin-amd64,windows-amd64
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2020-07-10 09:09:21 -05:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
environment: null
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2020-07-10 09:09:21 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
PORT: 3001
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
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:
|
|
|
|
from_secret: github_token_pr
|
|
|
|
HOST: grafana-server
|
|
|
|
image: us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:latest
|
|
|
|
name: end-to-end-tests-cloud-plugins-suite-azure
|
|
|
|
when:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- pkg/tsdb/azuremonitor/**
|
|
|
|
- public/app/plugins/datasource/grafana-azure-monitor-datasource/**
|
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
|
|
|
|
image: google/cloud-sdk:406.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:
|
2021-10-21 01:59:12 -05:00
|
|
|
- build-frontend
|
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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-07-20 08:43:19 -05:00
|
|
|
name: copy-packages-for-docker
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-09-14 06:23:17 -05:00
|
|
|
- yarn wait-on 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:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss -archs amd64
|
2022-02-07 11:30:41 -06:00
|
|
|
depends_on:
|
2021-10-14 09:02:45 -05:00
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-02-07 11:30:41 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-docker-images
|
2022-02-07 11:30:41 -06:00
|
|
|
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
|
2021-11-17 03:25:55 -06:00
|
|
|
- environment:
|
|
|
|
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
|
2021-11-17 03:25:55 -06:00
|
|
|
name: mysql
|
2021-12-15 06:48:59 -06:00
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
2021-11-17 03:25:55 -06:00
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-16 09:41:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-16 09:41:56 -05:00
|
|
|
name: wire-install
|
2021-11-17 03:25:55 -06:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-11-17 03:25:55 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-11-17 03:25:55 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-11-17 03:25:55 -06:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-11-17 03:25:55 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-11-17 03:25:55 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-11-17 03:25:55 -06:00
|
|
|
name: mysql-integration-tests
|
|
|
|
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
|
|
|
|
- name: mysql
|
|
|
|
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:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-02-21 05:55:16 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-02-21 05:55:16 -06:00
|
|
|
- commands:
|
2022-03-11 08:48:23 -06:00
|
|
|
- |-
|
|
|
|
echo -e "unknwon
|
|
|
|
referer
|
|
|
|
errorstring
|
|
|
|
eror
|
|
|
|
iam
|
|
|
|
wan" > words_to_ignore.txt
|
|
|
|
- codespell -I words_to_ignore.txt docs/
|
|
|
|
- rm words_to_ignore.txt
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-11 08:48:23 -06:00
|
|
|
name: lint-docs
|
2022-02-21 05:55:16 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p /hugo/content/docs/grafana
|
|
|
|
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
|
|
|
|
- cd /hugo && make prod
|
|
|
|
image: grafana/docs-base:latest
|
|
|
|
name: build-docs-website
|
|
|
|
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
|
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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-14 01:00:06 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build shellcheck
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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: []
|
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
|
2022-02-22 12:06:14 -06:00
|
|
|
name: main-docs
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-02-22 12:06:14 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-02-22 12:06:14 -06:00
|
|
|
- commands:
|
2022-03-11 08:48:23 -06:00
|
|
|
- |-
|
|
|
|
echo -e "unknwon
|
|
|
|
referer
|
|
|
|
errorstring
|
|
|
|
eror
|
|
|
|
iam
|
|
|
|
wan" > words_to_ignore.txt
|
|
|
|
- codespell -I words_to_ignore.txt docs/
|
|
|
|
- rm words_to_ignore.txt
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-11 08:48:23 -06:00
|
|
|
name: lint-docs
|
2022-02-22 12:06:14 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p /hugo/content/docs/grafana
|
|
|
|
- cp -r docs/sources/* /hugo/content/docs/grafana/latest/
|
|
|
|
- cd /hugo && make prod
|
|
|
|
image: grafana/docs-base:latest
|
|
|
|
name: build-docs-website
|
|
|
|
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
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2021-10-08 09:19:10 -05:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-06-29 09:04:52 -05:00
|
|
|
- commands:
|
|
|
|
- yarn betterer ci
|
|
|
|
depends_on:
|
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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
|
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
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 14:39:28 -05:00
|
|
|
name: yarn-install
|
|
|
|
- commands:
|
|
|
|
- yarn run prettier:check
|
|
|
|
- yarn run lint
|
|
|
|
- yarn run i18n:compile
|
|
|
|
- yarn run typecheck
|
|
|
|
depends_on:
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 14:39:28 -05:00
|
|
|
name: lint-frontend
|
|
|
|
trigger:
|
|
|
|
branch: main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- '*.md'
|
|
|
|
- docs/**
|
|
|
|
- latest.json
|
|
|
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-05-03 06:54:47 -05:00
|
|
|
name: identify-runner
|
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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-05-03 06:54:47 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-05-03 06:54:47 -05:00
|
|
|
name: wire-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2021-08-24 10:07:06 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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
|
|
|
|
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
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-21 06:05:19 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-09-21 06:05:19 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- apt-get update && apt-get install make
|
|
|
|
- make lint-go
|
|
|
|
depends_on:
|
|
|
|
- wire-install
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: "1"
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-21 06:05:19 -05:00
|
|
|
name: lint-backend
|
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
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2021-12-20 02:09:25 -06:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-07-28 09:11:22 -05:00
|
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-07-17 06:52:09 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-backend
|
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-07-17 06:52:09 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2020-09-24 08:20:48 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- ./bin/build package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --sign
|
2021-01-06 06:22:20 -06:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2021-01-06 06:22:20 -06:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2020-09-24 08:20:48 -05:00
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2020-07-17 06:52:09 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
PORT: 3001
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
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:
|
|
|
|
from_secret: github_token_pr
|
|
|
|
HOST: grafana-server
|
|
|
|
image: us-docker.pkg.dev/grafanalabs-dev/cloud-data-sources/e2e:latest
|
|
|
|
name: end-to-end-tests-cloud-plugins-suite-azure
|
|
|
|
when:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- pkg/tsdb/azuremonitor/**
|
|
|
|
- public/app/plugins/datasource/grafana-azure-monitor-datasource/**
|
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
|
|
|
|
image: google/cloud-sdk:406.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:
|
2021-10-21 01:59:12 -05:00
|
|
|
- build-frontend
|
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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-07-20 08:43:19 -05:00
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
|
|
|
- yarn wait-on http://$HOST:$PORT
|
|
|
|
- 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:
|
|
|
|
from_secret: gcp_key
|
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:
|
2022-09-12 13:28:08 -05:00
|
|
|
- ./scripts/ci-frontend-metrics.sh | ./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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss
|
2022-02-07 11:30:41 -06:00
|
|
|
depends_on:
|
2021-10-14 09:02:45 -05:00
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-02-07 11:30:41 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-docker-images
|
2022-02-07 11:30:41 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss --ubuntu
|
2022-02-07 11:30:41 -06:00
|
|
|
depends_on:
|
2020-07-17 06:52:09 -05:00
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-02-07 11:30:41 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-docker-images-ubuntu
|
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:
|
|
|
|
- build-docker-images
|
|
|
|
- build-docker-images-ubuntu
|
|
|
|
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:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
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:
|
|
|
|
- build-docker-images
|
|
|
|
- build-docker-images-ubuntu
|
|
|
|
environment:
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
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:
|
2020-12-03 04:31:14 -06:00
|
|
|
- ./scripts/circle-release-canary-packages.sh
|
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
|
2020-07-17 06:52:09 -05:00
|
|
|
environment:
|
2021-12-13 02:50:19 -06:00
|
|
|
NPM_TOKEN:
|
|
|
|
from_secret: npm_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: release-canary-npm-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 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:
|
2021-02-09 07:55:11 -06:00
|
|
|
from_secret: gcp_key
|
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:
|
2021-10-14 09:02:45 -05:00
|
|
|
from_secret: gcp_key
|
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
|
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
|
|
|
|
- environment:
|
|
|
|
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
|
2021-12-20 02:33:47 -06:00
|
|
|
name: mysql
|
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
2021-12-20 02:09:25 -06:00
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
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
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-16 09:41:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-16 09:41:56 -05:00
|
|
|
name: wire-install
|
2021-12-20 02:09:25 -06:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-12-20 02:09:25 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-12-20 02:09:25 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-12-20 02:09:25 -06:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-12-20 02:09:25 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-12-20 02:09:25 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-12-20 02:09:25 -06:00
|
|
|
name: mysql-integration-tests
|
|
|
|
trigger:
|
|
|
|
branch: main
|
|
|
|
event:
|
|
|
|
- push
|
2022-08-03 07:08:43 -05:00
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- '*.md'
|
|
|
|
- docs/**
|
|
|
|
- latest.json
|
2021-12-20 02:09:25 -06:00
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
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"
|
2022-12-22 07:51:43 -06:00
|
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/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
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-08-19 04:46:36 -05:00
|
|
|
- $$gcpKey = $$env:GCP_KEY
|
2021-10-14 09:02:45 -05:00
|
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
|
|
> gcpkey.json'
|
2020-08-19 04:46:36 -05:00
|
|
|
- dos2unix gcpkey.json
|
|
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
|
|
- rm gcpkey.json
|
|
|
|
- cp C:\App\nssm-2.24.zip .
|
2022-08-08 12:05:26 -05:00
|
|
|
- .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER
|
2020-08-19 04:46:36 -05:00
|
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
2021-12-02 09:57:44 -06:00
|
|
|
- gsutil cp $$fname gs://grafana-downloads/oss/main/
|
|
|
|
- gsutil cp "$$fname.sha256" gs://grafana-downloads/oss/main/
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- windows-init
|
2020-08-19 04:46:36 -05:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
2021-12-09 07:09:17 -06:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2021-11-30 04:53:07 -06:00
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2021-10-14 09:02:45 -05:00
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
name: build-windows-installer
|
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:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
2021-10-14 09:02:45 -05:00
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2021-11-29 12:08:13 -06:00
|
|
|
depends_on: []
|
|
|
|
kind: pipeline
|
|
|
|
name: notify-drone-changes
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
steps:
|
|
|
|
- image: plugins/slack
|
|
|
|
name: slack
|
|
|
|
settings:
|
|
|
|
channel: slack-webhooks-test
|
|
|
|
template: "`.drone.yml` and `starlark` files have been changed on the OSS repo,
|
|
|
|
by: {{build.author}}. \nBranch: <https://github.com/{{ repo.owner }}/{{ repo.name
|
|
|
|
}}/commits/{{ build.branch }}|{{ build.branch }}>\nCommit hash: <https://github.com/{{repo.owner}}/{{repo.name}}/commit/{{build.commit}}|{{
|
|
|
|
truncate build.commit 8 }}>"
|
|
|
|
webhook:
|
|
|
|
from_secret: drone-changes-webhook
|
|
|
|
trigger:
|
|
|
|
branch: main
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
paths:
|
|
|
|
exclude:
|
|
|
|
- exclude
|
|
|
|
include:
|
|
|
|
- .drone.yml
|
2022-04-01 07:20:26 -05:00
|
|
|
repo:
|
|
|
|
- grafana/grafana
|
2021-11-29 12:08:13 -06:00
|
|
|
type: 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
|
|
|
|
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
|
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
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-oss-build-e2e-publish
|
2021-10-14 09:02:45 -05:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
2020-10-07 07:22:15 -05:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
os: linux
|
2022-01-11 03:17:00 -06:00
|
|
|
services: []
|
2020-10-07 07:22:15 -05:00
|
|
|
steps:
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-09 01:48:27 -05:00
|
|
|
name: verify-gen-cue
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-09-30 08:39:48 -05:00
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
2021-10-08 09:19:10 -05:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-07-28 09:11:22 -05:00
|
|
|
- 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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-07-28 09:11:22 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-backend --jobs 8 --edition oss ${DRONE_TAG}
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-backend
|
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition oss ${DRONE_TAG}
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss ${DRONE_TAG}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- ./bin/build package --jobs 8 --edition oss --sign ${DRONE_TAG}
|
2021-01-06 06:22:20 -06:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2021-01-06 06:22:20 -06:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss --shouldSave
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss --shouldSave --ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images-ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
PORT: 3001
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
2020-10-07 07:22:15 -05: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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
2021-11-24 04:20:11 -06:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- grafana-server
|
2020-11-02 03:02:42 -06:00
|
|
|
environment:
|
2022-01-20 11:01:00 -06:00
|
|
|
HOST: grafana-server
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-various-suite
|
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
|
|
|
|
image: google/cloud-sdk:406.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:
|
|
|
|
- yarn storybook:build
|
2022-12-07 01:56:15 -06:00
|
|
|
- ./bin/build verify-storybook
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2021-10-21 01:59:12 -05:00
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-02-10 01:58:41 -06:00
|
|
|
environment:
|
2021-10-14 09:02:45 -05:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-storybook
|
2022-09-07 07:08:13 -05:00
|
|
|
when:
|
2022-11-14 04:14:50 -06:00
|
|
|
event:
|
|
|
|
- tag
|
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-10 01:58:41 -06:00
|
|
|
depends_on:
|
2022-01-20 11:01:00 -06:00
|
|
|
- grafana-server
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2020-10-07 07:22:15 -05:00
|
|
|
from_secret: gcp_key
|
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
|
|
|
|
- commands:
|
2022-11-18 09:22:14 -06:00
|
|
|
- ./bin/build upload-packages --edition oss
|
2020-10-07 07:22:15 -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-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2021-10-14 09:02:45 -05:00
|
|
|
from_secret: gcp_key
|
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
|
|
|
|
- commands:
|
2022-09-15 03:06:43 -05:00
|
|
|
- ./bin/build store-storybook --deployment latest
|
|
|
|
- ./bin/build store-storybook --deployment ${DRONE_TAG}
|
2020-10-26 03:47:51 -05:00
|
|
|
depends_on:
|
|
|
|
- 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:
|
|
|
|
from_secret: gcp_key
|
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-09-07 07:08:13 -05:00
|
|
|
when:
|
2022-11-14 04:14:50 -06:00
|
|
|
event:
|
|
|
|
- tag
|
2021-11-30 04:53:07 -06:00
|
|
|
- commands:
|
2022-01-11 08:28:29 -06:00
|
|
|
- ./bin/grabpl artifacts npm store --tag ${DRONE_TAG}
|
2021-11-30 04:53:07 -06:00
|
|
|
depends_on:
|
2022-04-06 07:26:59 -05:00
|
|
|
- build-frontend-packages
|
2021-11-30 04:53:07 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-11-30 04:53:07 -06:00
|
|
|
name: store-npm-packages
|
2020-10-07 07:22:15 -05:00
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2020-10-07 07:22:15 -05:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
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-12-15 06:48:59 -06:00
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2020-10-07 07:22:15 -05:00
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 03:17:00 -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
|
2020-10-07 07:22:15 -05:00
|
|
|
kind: pipeline
|
2022-10-10 10:46:56 -05:00
|
|
|
name: release-oss-test-frontend
|
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:
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn betterer ci
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: betterer-frontend
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn run ci:test-frontend
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: test-frontend
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
|
|
|
ref:
|
|
|
|
- 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-oss-test-backend
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-10 10:46:56 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46: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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -short -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend-integration
|
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2022-01-11 03:17:00 -06:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
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
|
|
|
---
|
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
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-oss-integration-tests
|
2021-10-14 09:02:45 -05:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
2020-10-07 07:22:15 -05:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
os: linux
|
|
|
|
services:
|
|
|
|
- environment:
|
2021-12-15 06:48:59 -06:00
|
|
|
PGDATA: /var/lib/postgresql/data/pgdata
|
2021-10-14 09:02:45 -05: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
|
2021-10-14 09:02:45 -05:00
|
|
|
- environment:
|
|
|
|
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
|
2021-10-14 09:02:45 -05:00
|
|
|
name: mysql
|
2021-12-15 06:48:59 -06:00
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
2022-01-11 03:17:00 -06:00
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-01-11 03:17:00 -06: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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-16 09:41:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-16 09:41:56 -05:00
|
|
|
name: wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: mysql-integration-tests
|
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2022-01-11 03:17:00 -06:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-oss-build-e2e-publish
|
2022-10-10 10:46:56 -05:00
|
|
|
- release-oss-test-frontend
|
|
|
|
- release-oss-test-backend
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-oss-integration-tests
|
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
|
2022-01-11 03:17:00 -06:00
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-oss-windows
|
2022-01-11 03:17:00 -06:00
|
|
|
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"
|
2022-12-22 07:51:43 -06:00
|
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe
|
2022-01-11 03:17:00 -06:00
|
|
|
-OutFile grabpl.exe
|
|
|
|
image: grafana/ci-wix:0.1.1
|
2022-04-14 06:56:14 -05:00
|
|
|
name: windows-init
|
2022-01-11 03:17:00 -06:00
|
|
|
- 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 --edition oss ${DRONE_TAG}
|
|
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
2022-01-19 07:12:57 -06:00
|
|
|
- gsutil cp $$fname gs://%PRERELEASE_BUCKET%/artifacts/downloads/${DRONE_TAG}/oss/release/
|
|
|
|
- gsutil cp "$$fname.sha256" gs://%PRERELEASE_BUCKET%/artifacts/downloads/${DRONE_TAG}/oss/release/
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- windows-init
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
name: build-windows-installer
|
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2022-01-11 03:17:00 -06:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
2022-10-04 02:35:18 -05:00
|
|
|
environment:
|
2022-10-10 10:46:56 -05:00
|
|
|
EDITION: enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-enterprise-build-e2e-publish
|
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:
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-10-07 07:22:15 -05:00
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2021-10-14 09:02:45 -05:00
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
2020-10-07 07:22:15 -05:00
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
2020-10-16 05:54:41 -05:00
|
|
|
- git checkout ${DRONE_TAG}
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-11-19 04:35:57 -06:00
|
|
|
name: clone-enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-10-15 07:06:52 -05:00
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
2020-10-07 07:22:15 -05:00
|
|
|
- mv grafana-enterprise /tmp/
|
2021-12-09 07:09:17 -06:00
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
2021-06-01 06:29:52 -05:00
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
2020-10-07 07:22:15 -05:00
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
2021-11-19 04:35:57 -06:00
|
|
|
- clone-enterprise
|
2021-12-09 07:09:17 -06:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: init-enterprise
|
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:
|
|
|
|
- init-enterprise
|
2022-07-28 09:11:22 -05:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-07-28 09:11:22 -05:00
|
|
|
name: compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-07-28 09:11:22 -05:00
|
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise ${DRONE_TAG}
|
2020-11-25 01:11:08 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: build-backend
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition enterprise ${DRONE_TAG}
|
2021-05-04 08:05:39 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition enterprise ${DRONE_TAG}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition enterprise
|
2021-09-30 02:56:08 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: build-plugins
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- ./bin/build package --jobs 8 --edition enterprise --sign ${DRONE_TAG}
|
2021-01-06 06:22:20 -06:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2021-01-06 06:22:20 -06:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition enterprise --shouldSave
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition enterprise --shouldSave --ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images-ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
2020-12-23 08:42:20 -06:00
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2020-12-23 08:42:20 -06:00
|
|
|
PORT: 3001
|
2022-01-20 11:01:00 -06:00
|
|
|
RUNDIR: scripts/grafana-server/tmp-grafana-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
2020-10-07 07:22:15 -05: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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
2021-11-24 04:20:11 -06: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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-various-suite
|
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
|
|
|
|
image: google/cloud-sdk:406.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:
|
2022-11-18 07:37:18 -06:00
|
|
|
- ./bin/build upload-cdn --edition enterprise
|
2021-02-10 01:58:41 -06:00
|
|
|
depends_on:
|
2021-12-02 06:55:23 -06:00
|
|
|
- package
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2020-10-07 07:22:15 -05:00
|
|
|
from_secret: gcp_key
|
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
|
|
|
|
- commands:
|
2022-11-18 09:22:14 -06:00
|
|
|
- ./bin/build upload-packages --edition enterprise
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2021-12-02 06:55:23 -06:00
|
|
|
- package
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2021-10-14 09:02:45 -05:00
|
|
|
from_secret: gcp_key
|
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
|
2020-10-07 07:22:15 -05:00
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2020-10-07 07:22:15 -05:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
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-12-15 06:48:59 -06:00
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2020-10-07 07:22:15 -05:00
|
|
|
---
|
2021-10-14 09:02:45 -05:00
|
|
|
clone:
|
|
|
|
disable: true
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2020-10-07 07:22:15 -05:00
|
|
|
kind: pipeline
|
2022-10-10 10:46:56 -05:00
|
|
|
name: release-enterprise-test-frontend
|
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:
|
2022-10-11 02:05:13 -05:00
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-11 02:05:13 -05:00
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-11 02:05:13 -05:00
|
|
|
name: init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn install --immutable
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: yarn-install
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn betterer ci
|
2022-04-14 06:56:14 -05:00
|
|
|
depends_on:
|
2022-10-11 02:05:13 -05:00
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: betterer-frontend
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn run ci:test-frontend
|
2022-04-14 06:56:14 -05:00
|
|
|
depends_on:
|
2022-10-11 03:42:24 -05:00
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: test-frontend
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: release-enterprise-test-backend
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-10-10 14:46:12 -05:00
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 14:46:12 -05:00
|
|
|
name: clone-enterprise
|
2022-10-11 03:42:24 -05:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-10-11 03:42:24 -05:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-10-10 14:46:12 -05:00
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 14:46:12 -05:00
|
|
|
name: init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
2022-10-10 14:46:12 -05:00
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-10 10:46:56 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-10-11 02:05:13 -05:00
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- make gen-go
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-10-10 10:46:56 -05:00
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -short -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend-integration
|
2020-10-07 07:22:15 -05:00
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2020-10-07 07:22:15 -05:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
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
|
|
|
---
|
2022-01-11 03:17:00 -06:00
|
|
|
clone:
|
|
|
|
disable: true
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on: []
|
2022-10-10 10:46:56 -05:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: release-enterprise-integration-tests
|
|
|
|
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
|
|
|
|
- environment:
|
|
|
|
MYSQL_DATABASE: grafana_tests
|
|
|
|
MYSQL_PASSWORD: password
|
|
|
|
MYSQL_ROOT_PASSWORD: rootpass
|
|
|
|
MYSQL_USER: grafana
|
|
|
|
image: mysql:5.7.39
|
|
|
|
name: mysql
|
2021-12-15 06:48:59 -06:00
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
2022-01-11 03:17:00 -06:00
|
|
|
- environment: {}
|
|
|
|
image: redis:6.2.1-alpine
|
|
|
|
name: redis
|
|
|
|
- environment: {}
|
|
|
|
image: memcached:1.6.9-alpine
|
|
|
|
name: memcached
|
2020-10-07 07:22:15 -05:00
|
|
|
steps:
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-10-07 07:22:15 -05:00
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2021-10-14 09:02:45 -05:00
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: clone-enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2022-01-11 03:17:00 -06:00
|
|
|
- clone-enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: init-enterprise
|
2022-06-22 08:22:42 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-22 08:22:42 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-22 08:22:42 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-22 08:22:42 -05:00
|
|
|
name: wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-22 08:22:42 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-10-21 15:28:57 -05:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-21 15:28:57 -05:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-22 08:22:42 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-10-21 15:28:57 -05:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-21 15:28:57 -05:00
|
|
|
name: mysql-integration-tests
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
|
|
|
- ./bin/grabpl integration-tests
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
REDIS_URL: redis://redis:6379/0
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: redis-integration-tests
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
|
|
|
- ./bin/grabpl integration-tests
|
2020-10-07 07:22:15 -05:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
MEMCACHED_HOSTS: memcached:11211
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: memcached-integration-tests
|
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
2022-01-11 03:17:00 -06:00
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on:
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-enterprise-build-e2e-publish
|
2022-10-10 10:46:56 -05:00
|
|
|
- release-enterprise-test-frontend
|
|
|
|
- release-enterprise-test-backend
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-enterprise-integration-tests
|
2022-10-04 02:35:18 -05:00
|
|
|
environment:
|
2022-10-10 10:46:56 -05:00
|
|
|
EDITION: enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-enterprise-windows
|
2022-01-11 03:17:00 -06:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: windows
|
|
|
|
version: "1809"
|
|
|
|
services: []
|
|
|
|
steps:
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
|
|
image: mcr.microsoft.com/windows:1809
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- $$ProgressPreference = "SilentlyContinue"
|
2022-12-22 07:51:43 -06:00
|
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe
|
2022-01-11 03:17:00 -06:00
|
|
|
-OutFile grabpl.exe
|
|
|
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
2020-10-07 07:22:15 -05:00
|
|
|
environment:
|
2022-01-11 03:17:00 -06:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
name: clone
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-11 03:17:00 -06:00
|
|
|
- cp -r grafana-enterprise C:\App\grafana-enterprise
|
|
|
|
- rm -r -force grafana-enterprise
|
|
|
|
- cp grabpl.exe C:\App\grabpl.exe
|
|
|
|
- rm -force grabpl.exe
|
|
|
|
- C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise
|
|
|
|
- cp C:\App\grabpl.exe grabpl.exe
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/ci-wix:0.1.1
|
2022-04-14 06:56:14 -05:00
|
|
|
name: windows-init
|
2022-01-11 03:17:00 -06:00
|
|
|
- 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 --edition enterprise ${DRONE_TAG}
|
|
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
2022-01-19 07:12:57 -06:00
|
|
|
- gsutil cp $$fname gs://%PRERELEASE_BUCKET%/artifacts/downloads/${DRONE_TAG}/enterprise/release/
|
|
|
|
- gsutil cp "$$fname.sha256" gs://%PRERELEASE_BUCKET%/artifacts/downloads/${DRONE_TAG}/enterprise/release/
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-11-21 12:06:00 -06:00
|
|
|
- windows-init
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
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:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: release-enterprise2-build-e2e-publish
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-11-21 12:06:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: init-enterprise
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: yarn-install
|
|
|
|
- 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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: verify-gen-cue
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend --jobs 8 --edition enterprise ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition enterprise ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend-packages
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-plugins --jobs 8 --edition enterprise
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise2 ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- wire-install
|
|
|
|
- compile-build-cmd
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-backend-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build package --jobs 8 --edition enterprise2 --sign ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- build-plugins
|
|
|
|
- build-backend-enterprise2
|
|
|
|
- build-frontend
|
|
|
|
- build-frontend-packages
|
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: package-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-cdn --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
environment:
|
|
|
|
ENTERPRISE2_CDN_PATH:
|
|
|
|
from_secret: enterprise2-cdn-path
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-cdn-assets-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave --ubuntu
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images-ubuntu
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- build-docker-images
|
|
|
|
- build-docker-images-ubuntu
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker publish-enterprise2 --dockerhub-repo $${DOCKER_ENTERPRISE2_REPO}
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise2
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key_hg
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: publish-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-packages --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-packages-enterprise2
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- promote
|
|
|
|
ref:
|
|
|
|
- refs/tags/v*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: custom-release-enterprise2-build-e2e-publish
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-11-21 12:06:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_TAG}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
${DRONE_TAG}
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: init-enterprise
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: yarn-install
|
|
|
|
- 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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: verify-gen-cue
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend --jobs 8 --edition enterprise ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition enterprise ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend-packages
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-plugins --jobs 8 --edition enterprise
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise2 ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- wire-install
|
|
|
|
- compile-build-cmd
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-backend-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build package --jobs 8 --edition enterprise2 --sign ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- build-plugins
|
|
|
|
- build-backend-enterprise2
|
|
|
|
- build-frontend
|
|
|
|
- build-frontend-packages
|
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: package-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-cdn --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
environment:
|
|
|
|
ENTERPRISE2_CDN_PATH:
|
|
|
|
from_secret: enterprise2-cdn-path
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-cdn-assets-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave --ubuntu
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images-ubuntu
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- build-docker-images
|
|
|
|
- build-docker-images-ubuntu
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker publish-enterprise2 --dockerhub-repo $${DOCKER_ENTERPRISE2_REPO}
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise2
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key_hg
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: publish-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-packages --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-11-21 12:06:00 -06:00
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-packages-enterprise2
|
2022-01-11 03:17:00 -06:00
|
|
|
trigger:
|
2022-01-11 08:28:29 -06:00
|
|
|
event:
|
2022-11-21 12:06:00 -06:00
|
|
|
- custom
|
2022-01-11 03:17:00 -06:00
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
2022-11-21 12:06:00 -06:00
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2022-01-11 03:17:00 -06:00
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 03:17:00 -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-01-11 03:17:00 -06:00
|
|
|
kind: pipeline
|
2022-01-11 08:28:29 -06:00
|
|
|
name: publish-docker-oss-public
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-12-05 08:49:33 -06:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
2022-01-11 08:28:29 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-09-19 03:19:31 -05:00
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-19 03:19:31 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition oss
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
2022-09-19 03:19:31 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 08:28:29 -06:00
|
|
|
environment:
|
2022-11-21 12:06:00 -06:00
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
2022-01-11 08:28:29 -06:00
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-oss
|
|
|
|
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 --version-tag
|
2022-11-17 07:30:09 -06:00
|
|
|
${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- fetch-images-oss
|
|
|
|
environment:
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-11-21 12:06:00 -06:00
|
|
|
name: publish-images-grafana
|
2022-01-11 08:28:29 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-11-21 12:06:00 -06:00
|
|
|
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana/grafana-oss
|
|
|
|
--version-tag ${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- fetch-images-oss
|
|
|
|
environment:
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-11-01 08:33:16 -05:00
|
|
|
name: publish-images-grafana/grafana-oss
|
2022-01-11 08:28:29 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-docker-enterprise-public
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-12-05 08:49:33 -06:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
2022-01-11 08:28:29 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-09-19 03:19:31 -05:00
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-19 03:19:31 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
2022-09-19 03:19:31 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 08:28:29 -06:00
|
|
|
environment:
|
2022-11-21 12:06:00 -06:00
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
2022-01-11 08:28:29 -06:00
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-11-01 08:33:16 -05:00
|
|
|
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-enterprise
|
2022-11-17 07:30:09 -06:00
|
|
|
--version-tag ${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise
|
|
|
|
environment:
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-11-21 12:06:00 -06:00
|
|
|
name: publish-images-grafana-enterprise
|
2022-01-11 08:28:29 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-docker-enterprise-security
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-12-05 08:49:33 -06:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
2022-01-11 08:28:29 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-09-19 03:19:31 -05:00
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-09-19 03:19:31 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
2022-09-19 03:19:31 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 08:28:29 -06:00
|
|
|
environment:
|
2022-11-21 12:06:00 -06:00
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
2022-01-11 08:28:29 -06:00
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-11-01 08:33:16 -05:00
|
|
|
- ./bin/grabpl artifacts docker publish --security --dockerhub-repo grafana/grafana-enterprise
|
2022-11-17 07:30:09 -06:00
|
|
|
--version-tag ${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise
|
|
|
|
environment:
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-11-21 12:06:00 -06:00
|
|
|
name: publish-images-grafana-enterprise
|
2022-01-11 08:28:29 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- security
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-12-12 08:51:27 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: publish-github-public
|
|
|
|
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
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build publish github --repo $${GH_REGISTRY} --create
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise2
|
|
|
|
environment:
|
|
|
|
GH_REGISTRY:
|
|
|
|
from_secret: gh_registry
|
|
|
|
GH_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: publish-github
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
retries: 3
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: publish-github-security
|
|
|
|
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
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build publish github --repo $${GH_REGISTRY} --create
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise2
|
|
|
|
environment:
|
|
|
|
GH_REGISTRY:
|
|
|
|
from_secret: gh_registry
|
|
|
|
GH_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: publish-github
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- security
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-12-19 10:25:48 -06:00
|
|
|
clone:
|
|
|
|
retries: 3
|
|
|
|
depends_on:
|
|
|
|
- publish-docker-enterprise-public
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: publish-aws-marketplace-public
|
|
|
|
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
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build publish aws --image grafana/grafana-enterprise --repo grafana-labs/grafanaenterprise
|
|
|
|
--product 422b46fb-bea6-4f27-8bcc-832117bd627e
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise
|
|
|
|
environment:
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: aws_access_key_id
|
|
|
|
AWS_REGION:
|
|
|
|
from_secret: aws_region
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: aws_secret_access_key
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: publish-aws-marketplace
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-12-12 08:51:27 -06:00
|
|
|
clone:
|
|
|
|
retries: 3
|
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: all
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-artifacts-security
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-11-17 07:30:09 -06:00
|
|
|
- ./bin/grabpl artifacts publish --security --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- grabpl
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
2022-04-08 03:06:45 -05:00
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-07-20 05:34:09 -05:00
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
2022-01-11 08:28:29 -06:00
|
|
|
name: publish-artifacts
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- security
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: all
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-artifacts-public
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-11-17 07:30:09 -06:00
|
|
|
- ./bin/grabpl artifacts publish --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- grabpl
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
2022-04-08 03:06:45 -05:00
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-07-20 05:34:09 -05:00
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
2022-01-11 08:28:29 -06:00
|
|
|
name: publish-artifacts
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: all
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-npm-packages-public
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-04-21 09:31:39 -05:00
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-21 09:31:39 -05:00
|
|
|
name: yarn-install
|
2022-01-11 08:28:29 -06:00
|
|
|
- commands:
|
2022-11-17 07:30:09 -06:00
|
|
|
- ./bin/grabpl artifacts npm retrieve --tag ${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
2022-04-28 05:15:28 -05:00
|
|
|
- yarn-install
|
2022-01-11 08:28:29 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-08-03 07:24:32 -05:00
|
|
|
failure: ignore
|
2022-07-20 05:34:09 -05:00
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
2022-01-11 08:28:29 -06:00
|
|
|
name: retrieve-npm-packages
|
|
|
|
- commands:
|
2022-11-17 07:30:09 -06:00
|
|
|
- ./bin/grabpl artifacts npm release --tag ${DRONE_TAG}
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on:
|
|
|
|
- retrieve-npm-packages
|
|
|
|
environment:
|
|
|
|
NPM_TOKEN:
|
|
|
|
from_secret: npm_token
|
2022-08-03 07:24:32 -05:00
|
|
|
failure: ignore
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 08:28:29 -06:00
|
|
|
name: release-npm-packages
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-19 07:12:57 -06:00
|
|
|
depends_on:
|
|
|
|
- publish-artifacts-public
|
2022-03-31 07:04:05 -05:00
|
|
|
- publish-docker-oss-public
|
|
|
|
- publish-docker-enterprise-public
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: oss
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
2022-04-28 06:53:32 -05:00
|
|
|
name: publish-packages-oss
|
2022-01-11 08:28:29 -06:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 08:28:29 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-10-06 02:14:38 -05:00
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-06 02:14:38 -05:00
|
|
|
name: compile-build-cmd
|
2022-09-01 06:13:44 -05:00
|
|
|
- depends_on:
|
2022-09-01 07:43:40 -05:00
|
|
|
- grabpl
|
2022-09-01 06:13:44 -05:00
|
|
|
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
2022-10-18 05:41:23 -05:00
|
|
|
name: publish-linux-packages-deb
|
2022-09-27 07:44:39 -05:00
|
|
|
privileged: true
|
2022-09-01 06:13:44 -05:00
|
|
|
settings:
|
|
|
|
access_key_id:
|
|
|
|
from_secret: packages_access_key_id
|
2022-11-02 05:21:41 -05:00
|
|
|
deb_distribution: auto
|
2022-09-01 06:13:44 -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
|
|
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/oss/**.deb
|
|
|
|
secret_access_key:
|
|
|
|
from_secret: packages_secret_access_key
|
|
|
|
service_account_json:
|
2022-10-12 06:07:13 -05:00
|
|
|
from_secret: packages_service_account
|
2022-09-01 06:13:44 -05:00
|
|
|
target_bucket: grafana-packages
|
2022-10-18 05:41:23 -05:00
|
|
|
- depends_on:
|
|
|
|
- grabpl
|
|
|
|
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
|
2022-11-02 05:21:41 -05:00
|
|
|
deb_distribution: auto
|
2022-10-18 05:41:23 -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
|
|
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/oss/**.rpm
|
|
|
|
secret_access_key:
|
|
|
|
from_secret: packages_secret_access_key
|
|
|
|
service_account_json:
|
|
|
|
from_secret: packages_service_account
|
|
|
|
target_bucket: grafana-packages
|
2022-11-02 13:42:01 -05:00
|
|
|
- commands:
|
|
|
|
- ./bin/build publish grafana-com --edition oss ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- publish-linux-packages-deb
|
|
|
|
- publish-linux-packages-rpm
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
GRAFANA_COM_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: publish-grafanacom-oss
|
2022-04-28 06:53:32 -05:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
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 06:53:32 -05:00
|
|
|
depends_on:
|
|
|
|
- publish-artifacts-public
|
|
|
|
- publish-docker-oss-public
|
|
|
|
- publish-docker-enterprise-public
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-04-28 06:53:32 -05:00
|
|
|
kind: pipeline
|
|
|
|
name: publish-packages-enterprise
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-04-28 06:53:32 -05:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-10-06 02:14:38 -05:00
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-06 02:14:38 -05:00
|
|
|
name: compile-build-cmd
|
2022-09-01 06:13:44 -05:00
|
|
|
- depends_on:
|
2022-09-01 07:43:40 -05:00
|
|
|
- grabpl
|
2022-09-01 06:13:44 -05:00
|
|
|
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
2022-10-18 05:41:23 -05:00
|
|
|
name: publish-linux-packages-deb
|
2022-09-27 07:44:39 -05:00
|
|
|
privileged: true
|
2022-09-01 06:13:44 -05:00
|
|
|
settings:
|
|
|
|
access_key_id:
|
|
|
|
from_secret: packages_access_key_id
|
2022-11-02 05:21:41 -05:00
|
|
|
deb_distribution: auto
|
2022-09-01 06:13:44 -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
|
|
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/enterprise/**.deb
|
|
|
|
secret_access_key:
|
|
|
|
from_secret: packages_secret_access_key
|
|
|
|
service_account_json:
|
2022-10-12 06:07:13 -05:00
|
|
|
from_secret: packages_service_account
|
2022-09-01 06:13:44 -05:00
|
|
|
target_bucket: grafana-packages
|
2022-10-18 05:41:23 -05:00
|
|
|
- depends_on:
|
|
|
|
- grabpl
|
|
|
|
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
|
2022-11-02 05:21:41 -05:00
|
|
|
deb_distribution: auto
|
2022-10-18 05:41:23 -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
|
|
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/enterprise/**.rpm
|
|
|
|
secret_access_key:
|
|
|
|
from_secret: packages_secret_access_key
|
|
|
|
service_account_json:
|
|
|
|
from_secret: packages_service_account
|
|
|
|
target_bucket: grafana-packages
|
2022-11-02 13:42:01 -05:00
|
|
|
- commands:
|
|
|
|
- ./bin/build publish grafana-com --edition enterprise ${DRONE_TAG}
|
|
|
|
depends_on:
|
|
|
|
- publish-linux-packages-deb
|
|
|
|
- publish-linux-packages-rpm
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
GRAFANA_COM_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: publish-grafanacom-enterprise
|
2022-01-11 08:28:29 -06:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- public
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 08:28:29 -06:00
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: all
|
2022-09-21 01:27:43 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2022-01-11 08:28:29 -06:00
|
|
|
kind: pipeline
|
2022-07-07 10:00:28 -05:00
|
|
|
name: publish-artifacts-page
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-07-07 10:00:28 -05:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- ./bin/grabpl artifacts-page
|
|
|
|
depends_on:
|
|
|
|
- grabpl
|
2022-08-22 08:44:43 -05:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-07-07 10:00:28 -05:00
|
|
|
name: artifacts-page
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target: security
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-07-07 10:00:28 -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
|
2022-07-07 10:00:28 -05:00
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-oss-build-e2e-publish
|
2021-10-14 09:02:45 -05:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
2020-10-23 03:16:17 -05:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
os: linux
|
2022-01-11 03:17:00 -06:00
|
|
|
services: []
|
2020-10-23 03:16:17 -05:00
|
|
|
steps:
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-09 01:48:27 -05:00
|
|
|
name: verify-gen-cue
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-09-30 08:39:48 -05:00
|
|
|
- make gen-go
|
2022-06-09 01:48:27 -05:00
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
2021-10-08 09:19:10 -05:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-07-28 09:11:22 -05:00
|
|
|
- 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
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-07-28 09:11:22 -05:00
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: build-backend
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- ./bin/build package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --sign
|
2021-01-06 06:22:20 -06:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2021-01-06 06:22:20 -06:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss --shouldSave
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition oss --shouldSave --ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images-ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
PORT: 3001
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
2020-10-23 03:16:17 -05: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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
2021-11-24 04:20:11 -06:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- grafana-server
|
2020-11-02 03:02:42 -06:00
|
|
|
environment:
|
2022-01-20 11:01:00 -06:00
|
|
|
HOST: grafana-server
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-various-suite
|
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
|
|
|
|
image: google/cloud-sdk:406.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:
|
|
|
|
- yarn storybook:build
|
2022-12-07 01:56:15 -06:00
|
|
|
- ./bin/build verify-storybook
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2021-10-21 01:59:12 -05:00
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-02-10 01:58:41 -06:00
|
|
|
environment:
|
2021-10-14 09:02:45 -05:00
|
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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:
|
2022-11-18 07:37:18 -06:00
|
|
|
- ./bin/build upload-cdn --edition oss
|
2021-02-10 01:58:41 -06:00
|
|
|
depends_on:
|
2022-01-20 11:01:00 -06:00
|
|
|
- grafana-server
|
2020-11-25 02:26:16 -06:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2020-11-25 02:26:16 -06:00
|
|
|
from_secret: gcp_key
|
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
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-11-18 09:22:14 -06:00
|
|
|
- ./bin/build upload-packages --edition oss
|
2020-11-25 02:26:16 -06: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
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2021-10-14 09:02:45 -05:00
|
|
|
from_secret: gcp_key
|
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
|
2020-10-23 03:16:17 -05:00
|
|
|
trigger:
|
|
|
|
ref:
|
2021-08-20 01:22:53 -05:00
|
|
|
- refs/heads/v[0-9]*
|
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-12-15 06:48:59 -06:00
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2020-10-23 03:16:17 -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-10-23 03:16:17 -05:00
|
|
|
kind: pipeline
|
2022-10-10 10:46:56 -05:00
|
|
|
name: release-branch-oss-test-frontend
|
2021-10-14 09:02:45 -05:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
2020-10-23 03:16:17 -05:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
os: linux
|
2022-01-11 03:17:00 -06:00
|
|
|
services: []
|
2020-10-23 03:16:17 -05:00
|
|
|
steps:
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-04-14 06:56:14 -05:00
|
|
|
name: identify-runner
|
2021-11-15 11:14:33 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2021-11-15 11:14:33 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2021-10-08 09:19:10 -05:00
|
|
|
- yarn install --immutable
|
2022-10-11 10:58:03 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn betterer ci
|
2021-05-04 08:05:39 -05:00
|
|
|
depends_on:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: betterer-frontend
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn run ci:test-frontend
|
2021-09-30 02:56:08 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: test-frontend
|
|
|
|
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: release-branch-oss-test-backend
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-10 10:46:56 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46: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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: wire-install
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -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
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2021-08-24 10:07:06 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: test-backend-integration
|
2022-01-11 03:17:00 -06:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 03:17:00 -06: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
|
2022-01-11 03:17:00 -06:00
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-oss-integration-tests
|
2022-01-11 03:17:00 -06: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
|
|
|
|
- environment:
|
|
|
|
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
|
2022-01-11 03:17:00 -06:00
|
|
|
name: mysql
|
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-01-11 03:17:00 -06: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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-06-22 08:22:42 -05:00
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on: []
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-16 09:41:56 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-16 09:41:56 -05:00
|
|
|
name: wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-10-21 15:28:57 -05:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-21 15:28:57 -05:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-16 09:41:56 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2021-10-21 15:28:57 -05:00
|
|
|
depends_on:
|
2022-06-16 09:41:56 -05:00
|
|
|
- wire-install
|
2021-10-21 15:28:57 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-21 15:28:57 -05:00
|
|
|
name: mysql-integration-tests
|
2022-01-11 03:17:00 -06:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
2022-08-03 06:51:29 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-branch-oss-build-e2e-publish
|
2022-10-10 10:46:56 -05:00
|
|
|
- release-branch-oss-test-frontend
|
|
|
|
- release-branch-oss-test-backend
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-branch-oss-integration-tests
|
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
|
2022-01-11 03:17:00 -06:00
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-oss-windows
|
2022-01-11 03:17:00 -06:00
|
|
|
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"
|
2022-12-22 07:51:43 -06:00
|
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe
|
2022-01-11 03:17:00 -06:00
|
|
|
-OutFile grabpl.exe
|
|
|
|
image: grafana/ci-wix:0.1.1
|
2022-04-14 06:56:14 -05:00
|
|
|
name: windows-init
|
2022-01-11 03:17:00 -06:00
|
|
|
- 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 .
|
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- windows-init
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
name: build-windows-installer
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
2022-10-04 02:35:18 -05:00
|
|
|
environment:
|
2022-10-10 10:46:56 -05:00
|
|
|
EDITION: enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-enterprise-build-e2e-publish
|
2022-01-11 03:17:00 -06:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-01-11 03:17:00 -06:00
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_BRANCH}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
2022-10-19 03:23:12 -05:00
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
2022-10-19 03:23:12 -05:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: init-enterprise
|
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:
|
|
|
|
- init-enterprise
|
2022-07-28 09:11:22 -05:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-07-28 09:11:22 -05:00
|
|
|
name: compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: yarn-install
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-07-28 09:11:22 -05:00
|
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-07-28 09:11:22 -05:00
|
|
|
- compile-build-cmd
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-backend
|
|
|
|
- commands:
|
2022-08-10 09:29:51 -05:00
|
|
|
- ./bin/build build-frontend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
2020-10-23 03:16:17 -05:00
|
|
|
depends_on:
|
2022-08-10 09:29:51 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2021-11-30 03:50:35 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- commands:
|
2022-09-06 12:09:08 -05:00
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
2022-03-02 05:02:07 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2022-03-02 05:02:07 -06:00
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-03-02 05:02:07 -06:00
|
|
|
name: build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-08-04 11:39:36 -05:00
|
|
|
- ./bin/build build-plugins --jobs 8 --edition enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- compile-build-cmd
|
2022-04-14 06:56:14 -05:00
|
|
|
- yarn-install
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
2022-09-23 11:49:07 -05:00
|
|
|
- ./bin/build package --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
2022-03-31 03:06:59 -05:00
|
|
|
--sign
|
2021-01-06 06:22:20 -06:00
|
|
|
depends_on:
|
2021-08-24 10:07:06 -05:00
|
|
|
- build-plugins
|
2021-01-06 06:22:20 -06:00
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2021-10-14 09:02:45 -05:00
|
|
|
name: package
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition enterprise --shouldSave
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
2022-08-09 01:43:28 -05:00
|
|
|
- ./bin/build build-docker --edition enterprise --shouldSave --ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
2022-08-09 01:43:28 -05:00
|
|
|
- compile-build-cmd
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
2022-02-07 11:30:41 -06:00
|
|
|
name: build-docker-images-ubuntu
|
2022-01-11 03:17:00 -06:00
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2022-01-20 11:01:00 -06:00
|
|
|
- ./scripts/grafana-server/start-server
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- build-plugins
|
|
|
|
- build-backend
|
|
|
|
- build-frontend
|
2022-03-02 05:02:07 -06:00
|
|
|
- build-frontend-packages
|
2021-10-14 09:02:45 -05:00
|
|
|
detach: true
|
2020-12-23 08:42:20 -06:00
|
|
|
environment:
|
2022-02-02 04:40:22 -06:00
|
|
|
ARCH: linux-amd64
|
2020-12-23 08:42:20 -06:00
|
|
|
PORT: 3001
|
2022-01-20 11:01:00 -06:00
|
|
|
RUNDIR: scripts/grafana-server/tmp-grafana-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-20 11:01:00 -06:00
|
|
|
name: grafana-server
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
2020-10-23 03:16:17 -05: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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-dashboards-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
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
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-panels-suite
|
|
|
|
- commands:
|
2021-12-28 06:59:20 -06:00
|
|
|
- apt-get install -y netcat
|
2022-09-02 10:02:10 -05:00
|
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
2021-11-24 04:20:11 -06:00
|
|
|
depends_on:
|
2022-02-02 04:40:22 -06:00
|
|
|
- grafana-server
|
2020-11-02 03:02:42 -06:00
|
|
|
environment:
|
2022-01-20 11:01:00 -06:00
|
|
|
HOST: grafana-server
|
2022-03-09 03:10:51 -06:00
|
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
2021-11-24 04:20:11 -06:00
|
|
|
name: end-to-end-tests-various-suite
|
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
|
|
|
|
image: google/cloud-sdk:406.0.0
|
2022-01-12 09:58:35 -06:00
|
|
|
name: e2e-tests-artifacts-upload
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|
2021-11-30 04:53:07 -06:00
|
|
|
- commands:
|
2022-11-18 07:37:18 -06:00
|
|
|
- ./bin/build upload-cdn --edition enterprise
|
2021-11-30 04:53:07 -06:00
|
|
|
depends_on:
|
2022-01-11 03:17:00 -06:00
|
|
|
- package
|
2021-11-30 04:53:07 -06:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2021-11-30 04:53:07 -06:00
|
|
|
from_secret: gcp_key
|
2022-01-11 03:17:00 -06:00
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2022-07-20 05:34:09 -05:00
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
2022-01-11 03:17:00 -06:00
|
|
|
name: upload-cdn-assets
|
2022-04-06 02:46:05 -05:00
|
|
|
when:
|
|
|
|
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 enterprise
|
2020-11-25 02:26:16 -06:00
|
|
|
depends_on:
|
2021-12-02 06:55:23 -06:00
|
|
|
- package
|
2021-10-14 09:02:45 -05:00
|
|
|
environment:
|
2022-02-07 03:11:27 -06:00
|
|
|
GCP_KEY:
|
2021-10-14 09:02:45 -05:00
|
|
|
from_secret: gcp_key
|
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
|
2020-10-23 03:16:17 -05:00
|
|
|
trigger:
|
|
|
|
ref:
|
2021-08-20 01:22:53 -05:00
|
|
|
- refs/heads/v[0-9]*
|
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-12-15 06:48:59 -06:00
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
2020-10-23 03:16:17 -05:00
|
|
|
---
|
2022-01-11 03:17:00 -06:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
2022-11-18 08:15:04 -06:00
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
2022-10-10 10:46:56 -05:00
|
|
|
name: release-branch-enterprise-test-frontend
|
2022-01-11 03:17:00 -06:00
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-10-11 02:05:13 -05:00
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_BRANCH}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-11 02:05:13 -05:00
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
2022-10-19 03:23:12 -05:00
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
2022-10-11 02:05:13 -05:00
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
2022-10-19 03:23:12 -05:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-11 02:05:13 -05:00
|
|
|
name: init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn install --immutable
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-10-11 10:58:03 -05:00
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: yarn-install
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn betterer ci
|
2022-04-14 06:56:14 -05:00
|
|
|
depends_on:
|
2022-10-11 02:05:13 -05:00
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: betterer-frontend
|
2022-04-14 06:56:14 -05:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn run ci:test-frontend
|
2022-04-14 06:56:14 -05:00
|
|
|
depends_on:
|
2022-10-11 03:42:24 -05:00
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
TEST_MAX_WORKERS: 50%
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: test-frontend
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: release-branch-enterprise-test-backend
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
2022-10-10 14:46:12 -05:00
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_BRANCH}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 14:46:12 -05:00
|
|
|
name: clone-enterprise
|
2022-10-11 03:42:24 -05:00
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-10-11 03:42:24 -05:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
2022-10-10 14:46:12 -05:00
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
2022-10-19 03:23:12 -05:00
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
2022-10-10 14:46:12 -05:00
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
2022-10-19 03:23:12 -05:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 14:46:12 -05:00
|
|
|
name: init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
2022-10-10 14:46:12 -05:00
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-10-10 10:46:56 -05:00
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-10 10:46:56 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
2022-10-11 02:05:13 -05:00
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 10:46:56 -05:00
|
|
|
- make gen-go
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-10-10 10:46:56 -05:00
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-10-10 10:46:56 -05:00
|
|
|
name: wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -short -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend
|
|
|
|
- commands:
|
2022-10-10 02:26:47 -05:00
|
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- wire-install
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: test-backend-integration
|
2022-10-10 10:46:56 -05:00
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
---
|
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
2022-10-04 02:35:18 -05:00
|
|
|
environment:
|
2022-10-10 10:46:56 -05:00
|
|
|
EDITION: enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-enterprise-integration-tests
|
2022-01-11 03:17:00 -06: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
|
|
|
|
- environment:
|
|
|
|
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
|
2022-01-11 03:17:00 -06:00
|
|
|
name: mysql
|
|
|
|
volumes:
|
|
|
|
- name: mysql
|
|
|
|
path: /var/lib/mysql
|
|
|
|
- environment: {}
|
|
|
|
image: redis:6.2.1-alpine
|
|
|
|
name: redis
|
|
|
|
- environment: {}
|
|
|
|
image: memcached:1.6.9-alpine
|
|
|
|
name: memcached
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-01-11 03:17:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
2022-08-15 11:17:55 -05:00
|
|
|
image: alpine:3.15.6
|
2022-01-11 03:17:00 -06:00
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_BRANCH}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
2022-10-19 03:23:12 -05:00
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
2022-01-11 03:17:00 -06:00
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
2022-10-19 03:23:12 -05:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-04-14 06:56:14 -05:00
|
|
|
name: init-enterprise
|
2022-06-22 08:22:42 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-22 08:22:42 -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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-11-03 10:04:39 -05:00
|
|
|
name: verify-gen-jsonnet
|
2022-06-22 08:22:42 -05:00
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- verify-gen-cue
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-06-22 08:22:42 -05:00
|
|
|
name: wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq postgresql-client
|
|
|
|
- dockerize -wait tcp://postgres:5432 -timeout 120s
|
|
|
|
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
|
|
|
- go clean -testcache
|
2022-06-22 08:22:42 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: postgres
|
|
|
|
PGPASSWORD: grafanatest
|
|
|
|
POSTGRES_HOST: postgres
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: postgres-integration-tests
|
|
|
|
- commands:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -yq default-mysql-client
|
|
|
|
- dockerize -wait tcp://mysql:3306 -timeout 120s
|
|
|
|
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
|
|
|
|
-prootpass
|
|
|
|
- go clean -testcache
|
2022-06-22 08:22:42 -05:00
|
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
2022-10-10 02:26:47 -05:00
|
|
|
-timeout=5m {}'
|
2022-01-11 03:17:00 -06:00
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
GRAFANA_TEST_DB: mysql
|
|
|
|
MYSQL_HOST: mysql
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: mysql-integration-tests
|
|
|
|
- commands:
|
|
|
|
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
|
|
|
- ./bin/grabpl integration-tests
|
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
REDIS_URL: redis://redis:6379/0
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: redis-integration-tests
|
|
|
|
- commands:
|
|
|
|
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
|
|
|
- ./bin/grabpl integration-tests
|
|
|
|
depends_on:
|
2022-06-22 08:22:42 -05:00
|
|
|
- wire-install
|
2022-01-11 03:17:00 -06:00
|
|
|
environment:
|
|
|
|
MEMCACHED_HOSTS: memcached:11211
|
2022-11-15 07:47:14 -06:00
|
|
|
image: grafana/build-container:1.6.4
|
2022-01-11 03:17:00 -06:00
|
|
|
name: memcached-integration-tests
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
2021-10-14 09:02:45 -05:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on:
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-branch-enterprise-build-e2e-publish
|
2022-10-10 10:46:56 -05:00
|
|
|
- release-branch-enterprise-test-frontend
|
|
|
|
- release-branch-enterprise-test-backend
|
2022-06-10 05:28:50 -05:00
|
|
|
- release-branch-enterprise-integration-tests
|
2022-10-04 02:35:18 -05:00
|
|
|
environment:
|
2022-10-10 10:46:56 -05:00
|
|
|
EDITION: enterprise
|
2021-10-14 09:02:45 -05:00
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
2020-10-23 03:16:17 -05:00
|
|
|
kind: pipeline
|
2022-06-10 05:28:50 -05:00
|
|
|
name: release-branch-enterprise-windows
|
2020-10-23 03:16:17 -05:00
|
|
|
platform:
|
|
|
|
arch: amd64
|
2021-10-14 09:02:45 -05:00
|
|
|
os: windows
|
|
|
|
version: "1809"
|
|
|
|
services: []
|
2020-10-23 03:16:17 -05:00
|
|
|
steps:
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-10-23 03:16:17 -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-10-23 03:16:17 -05:00
|
|
|
- $$ProgressPreference = "SilentlyContinue"
|
2022-12-22 07:51:43 -06:00
|
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/windows/grabpl.exe
|
2021-10-14 09:02:45 -05:00
|
|
|
-OutFile grabpl.exe
|
2020-10-23 03:16:17 -05:00
|
|
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout $$env:DRONE_BRANCH
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/ci-wix:0.1.1
|
2021-10-14 09:02:45 -05:00
|
|
|
name: clone
|
|
|
|
- commands:
|
2020-10-23 03:16:17 -05:00
|
|
|
- cp -r grafana-enterprise C:\App\grafana-enterprise
|
|
|
|
- rm -r -force grafana-enterprise
|
|
|
|
- cp grabpl.exe C:\App\grabpl.exe
|
|
|
|
- rm -force grabpl.exe
|
2021-12-09 07:09:17 -06:00
|
|
|
- C:\App\grabpl.exe init-enterprise --github-token $$env:GITHUB_TOKEN C:\App\grafana-enterprise
|
2020-10-23 03:16:17 -05:00
|
|
|
- cp C:\App\grabpl.exe grabpl.exe
|
|
|
|
depends_on:
|
|
|
|
- clone
|
2021-12-09 07:09:17 -06:00
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2020-10-23 03:16:17 -05:00
|
|
|
image: grafana/ci-wix:0.1.1
|
2022-04-14 06:56:14 -05:00
|
|
|
name: windows-init
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2020-10-23 03:16:17 -05:00
|
|
|
- $$gcpKey = $$env:GCP_KEY
|
2021-10-14 09:02:45 -05:00
|
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
|
|
> gcpkey.json'
|
2020-10-23 03:16:17 -05:00
|
|
|
- dos2unix gcpkey.json
|
|
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
|
|
- rm gcpkey.json
|
|
|
|
- cp C:\App\nssm-2.24.zip .
|
2021-10-14 09:02:45 -05:00
|
|
|
depends_on:
|
2022-04-14 06:56:14 -05:00
|
|
|
- windows-init
|
2020-10-23 03:16:17 -05:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
2021-12-09 07:09:17 -06:00
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
2021-11-30 04:53:07 -06:00
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
2021-10-14 09:02:45 -05:00
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
name: build-windows-installer
|
2020-10-23 03:16:17 -05:00
|
|
|
trigger:
|
|
|
|
ref:
|
2021-08-20 01:22:53 -05:00
|
|
|
- refs/heads/v[0-9]*
|
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
|
|
|
---
|
2022-11-21 12:06:00 -06:00
|
|
|
clone:
|
|
|
|
disable: true
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
EDITION: enterprise2
|
|
|
|
image_pull_secrets:
|
|
|
|
- dockerconfigjson
|
|
|
|
kind: pipeline
|
|
|
|
name: release-branch-enterprise2-build-e2e-publish
|
|
|
|
node:
|
|
|
|
type: no-parallel
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
services: []
|
|
|
|
steps:
|
|
|
|
- commands:
|
|
|
|
- mkdir -p bin
|
2022-12-22 07:51:43 -06:00
|
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.20/grabpl
|
2022-11-21 12:06:00 -06:00
|
|
|
- chmod +x bin/grabpl
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
name: grabpl
|
|
|
|
- commands:
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
image: alpine:3.15.6
|
|
|
|
name: identify-runner
|
|
|
|
- commands:
|
|
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
|
|
- cd grafana-enterprise
|
|
|
|
- git checkout ${DRONE_BRANCH}
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: clone-enterprise
|
|
|
|
- commands:
|
|
|
|
- mv bin/grabpl /tmp/
|
|
|
|
- rmdir bin
|
|
|
|
- mv grafana-enterprise /tmp/
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
|
|
|
- mkdir bin
|
|
|
|
- mv /tmp/grabpl bin/
|
|
|
|
depends_on:
|
|
|
|
- clone-enterprise
|
|
|
|
environment:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
from_secret: github_token
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: init-enterprise
|
|
|
|
- commands:
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
image: golang:1.19.3
|
|
|
|
name: compile-build-cmd
|
|
|
|
- commands:
|
|
|
|
- make gen-go
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: wire-install
|
|
|
|
- commands:
|
|
|
|
- yarn install --immutable
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: yarn-install
|
|
|
|
- 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.'
|
|
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
|
|
depends_on:
|
|
|
|
- init-enterprise
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: verify-gen-cue
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-frontend-packages
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-plugins --jobs 8 --edition enterprise
|
|
|
|
depends_on:
|
|
|
|
- compile-build-cmd
|
|
|
|
- yarn-install
|
|
|
|
environment:
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-plugins
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER}
|
|
|
|
--variants linux-amd64
|
|
|
|
depends_on:
|
|
|
|
- wire-install
|
|
|
|
- compile-build-cmd
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: build-backend-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build package --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER}
|
|
|
|
--variants linux-amd64 --sign
|
|
|
|
depends_on:
|
|
|
|
- build-plugins
|
|
|
|
- build-backend-enterprise2
|
|
|
|
- build-frontend
|
|
|
|
- build-frontend-packages
|
|
|
|
environment:
|
|
|
|
GPG_KEY_PASSWORD:
|
|
|
|
from_secret: gpg_key_password
|
|
|
|
GPG_PRIV_KEY:
|
|
|
|
from_secret: gpg_priv_key
|
|
|
|
GPG_PUB_KEY:
|
|
|
|
from_secret: gpg_pub_key
|
|
|
|
GRAFANA_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: package-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-cdn --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
environment:
|
|
|
|
ENTERPRISE2_CDN_PATH:
|
|
|
|
from_secret: enterprise2-cdn-path
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-cdn-assets-enterprise2
|
|
|
|
- commands:
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
image: grafana/build-container:1.6.4
|
|
|
|
name: copy-packages-for-docker
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build build-docker --edition enterprise2 --shouldSave --ubuntu
|
|
|
|
depends_on:
|
|
|
|
- copy-packages-for-docker
|
|
|
|
- compile-build-cmd
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: build-docker-images-ubuntu
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker fetch --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- build-docker-images
|
|
|
|
- build-docker-images-ubuntu
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: fetch-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build artifacts docker publish-enterprise2 --dockerhub-repo $${DOCKER_ENTERPRISE2_REPO}
|
|
|
|
depends_on:
|
|
|
|
- fetch-images-enterprise2
|
|
|
|
environment:
|
|
|
|
DOCKER_ENTERPRISE2_REPO:
|
|
|
|
from_secret: docker_enterprise2_repo
|
|
|
|
DOCKER_PASSWORD:
|
|
|
|
from_secret: docker_password
|
|
|
|
DOCKER_USER:
|
|
|
|
from_secret: docker_username
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key_hg
|
|
|
|
image: google/cloud-sdk
|
|
|
|
name: publish-images-enterprise2
|
|
|
|
volumes:
|
|
|
|
- name: docker
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
- commands:
|
|
|
|
- ./bin/build upload-packages --edition enterprise2
|
|
|
|
depends_on:
|
|
|
|
- package-enterprise2
|
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: upload-packages-enterprise2
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/v[0-9]*
|
|
|
|
type: docker
|
|
|
|
volumes:
|
|
|
|
- host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
name: docker
|
|
|
|
- name: postgres
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
- name: mysql
|
|
|
|
temp:
|
|
|
|
medium: memory
|
|
|
|
---
|
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:
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-05-26 07:27:40 -05:00
|
|
|
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest
|
2021-11-23 04:43:00 -06:00
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-unkown-low-medium-vulnerabilities
|
2021-10-14 09:02:45 -05:00
|
|
|
- commands:
|
2021-05-26 07:27:40 -05:00
|
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest
|
2021-11-23 04:43:00 -06:00
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-high-critical-vulnerabilities
|
|
|
|
- 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
|
|
|
|
---
|
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:
|
|
|
|
- commands:
|
|
|
|
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main
|
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-unkown-low-medium-vulnerabilities
|
|
|
|
- commands:
|
2021-05-26 07:27:40 -05:00
|
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main
|
2021-11-23 04:43:00 -06:00
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-high-critical-vulnerabilities
|
|
|
|
- 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
|
|
|
|
---
|
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:
|
|
|
|
- commands:
|
|
|
|
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest-ubuntu
|
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-unkown-low-medium-vulnerabilities
|
|
|
|
- commands:
|
2021-05-26 07:27:40 -05:00
|
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest-ubuntu
|
2021-11-23 04:43:00 -06:00
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-high-critical-vulnerabilities
|
|
|
|
- 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
|
|
|
|
---
|
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:
|
|
|
|
- commands:
|
|
|
|
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:main-ubuntu
|
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-unkown-low-medium-vulnerabilities
|
|
|
|
- commands:
|
2021-05-26 07:27:40 -05:00
|
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main-ubuntu
|
2021-11-23 04:43:00 -06:00
|
|
|
image: aquasec/trivy:0.21.0
|
|
|
|
name: scan-high-critical-vulnerabilities
|
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
|
2021-05-12 08:30:05 -05:00
|
|
|
---
|
2022-09-27 08:49:20 -05:00
|
|
|
clone:
|
|
|
|
retries: 3
|
|
|
|
kind: pipeline
|
|
|
|
name: grafana-com-nightly
|
|
|
|
platform:
|
|
|
|
arch: amd64
|
|
|
|
os: linux
|
|
|
|
steps:
|
|
|
|
- commands:
|
2022-10-06 02:14:38 -05:00
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
depends_on: []
|
|
|
|
environment:
|
|
|
|
CGO_ENABLED: 0
|
2022-11-04 08:50:43 -05:00
|
|
|
image: golang:1.19.3
|
2022-10-06 02:14:38 -05:00
|
|
|
name: compile-build-cmd
|
2022-09-27 08:49:20 -05:00
|
|
|
- commands:
|
2022-10-06 02:14:38 -05:00
|
|
|
- ./bin/build publish grafana-com --edition oss
|
2022-09-27 08:49:20 -05:00
|
|
|
depends_on:
|
2022-10-06 02:14:38 -05:00
|
|
|
- compile-build-cmd
|
2022-09-27 08:49:20 -05:00
|
|
|
environment:
|
|
|
|
GCP_KEY:
|
|
|
|
from_secret: gcp_key
|
|
|
|
GRAFANA_COM_API_KEY:
|
|
|
|
from_secret: grafana_api_key
|
|
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
|
|
name: post-to-grafana-com
|
|
|
|
trigger:
|
|
|
|
cron: grafana-com-nightly
|
|
|
|
event: cron
|
|
|
|
type: docker
|
|
|
|
---
|
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
|
|
|
|
---
|
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
|
|
|
|
---
|
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
|
|
|
|
---
|
2022-09-01 06:13:44 -05:00
|
|
|
get:
|
|
|
|
name: public-key
|
|
|
|
path: infra/data/ci/packages-publish/gpg
|
|
|
|
kind: secret
|
|
|
|
name: packages_gpg_public_key
|
|
|
|
---
|
|
|
|
get:
|
|
|
|
name: private-key
|
|
|
|
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
|
|
|
|
---
|
2022-12-19 10:25:48 -06:00
|
|
|
get:
|
|
|
|
name: aws_region
|
|
|
|
path: secret/data/common/aws-marketplace
|
|
|
|
kind: secret
|
|
|
|
name: aws_region
|
|
|
|
---
|
|
|
|
get:
|
|
|
|
name: aws_access_key_id
|
|
|
|
path: secret/data/common/aws-marketplace
|
|
|
|
kind: secret
|
|
|
|
name: aws_access_key_id
|
|
|
|
---
|
|
|
|
get:
|
|
|
|
name: aws_secret_access_key
|
|
|
|
path: secret/data/common/aws-marketplace
|
|
|
|
kind: secret
|
|
|
|
name: aws_secret_access_key
|
|
|
|
---
|
2021-08-02 08:35:49 -05:00
|
|
|
kind: signature
|
2022-12-22 07:51:43 -06:00
|
|
|
hmac: a1be45b783375352bc7cf74eef3646d4545f1545407972f0e888eef2d13a1d49
|
2021-11-09 08:06:14 -06:00
|
|
|
|
2020-07-10 09:09:21 -05:00
|
|
|
...
|