mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
c72d18f5e6
This reverts commit 747ddf7b33
.
6666 lines
166 KiB
YAML
6666 lines
166 KiB
YAML
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-verify-drone
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build verify-drone
|
|
depends_on:
|
|
- compile-build-cmd
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-verify-starlark
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build verify-starlark .
|
|
depends_on:
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: lint-starlark
|
|
trigger:
|
|
event:
|
|
- pull_request
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- '*.md'
|
|
include:
|
|
- scripts/drone/**
|
|
- .drone.star
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
|
| jq .head.repo.fork)
|
|
- if [ "$is_fork" != false ]; then return 1; fi
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
../grafana-enterprise
|
|
- cd ../grafana-enterprise
|
|
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
|
|
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
|
|
else git checkout main; fi
|
|
- cd ../
|
|
- ln -s src grafana
|
|
- cd ./grafana-enterprise
|
|
- ./build.sh
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- yarn-install
|
|
- clone-enterprise
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-lint-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
|
| jq .head.repo.fork)
|
|
- if [ "$is_fork" != false ]; then return 1; fi
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
../grafana-enterprise
|
|
- cd ../grafana-enterprise
|
|
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
|
|
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
|
|
else git checkout main; fi
|
|
- cd ../
|
|
- ln -s src grafana
|
|
- cd ./grafana-enterprise
|
|
- ./build.sh
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn run prettier:check
|
|
- yarn run lint
|
|
- yarn run i18n:compile
|
|
- yarn run typecheck
|
|
depends_on:
|
|
- yarn-install
|
|
- clone-enterprise
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-test-backend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
|
| jq .head.repo.fork)
|
|
- if [ "$is_fork" != false ]; then return 1; fi
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
../grafana-enterprise
|
|
- cd ../grafana-enterprise
|
|
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
|
|
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
|
|
else git checkout main; fi
|
|
- cd ../
|
|
- ln -s src grafana
|
|
- cd ./grafana-enterprise
|
|
- ./build.sh
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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:
|
|
- clone-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- clone-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
trigger:
|
|
event:
|
|
- pull_request
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- '*.md'
|
|
include:
|
|
- pkg/**
|
|
- packaging/**
|
|
- .drone.yml
|
|
- conf/**
|
|
- go.sum
|
|
- go.mod
|
|
- public/app/plugins/**/plugin.json
|
|
- devenv/**
|
|
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: pr-lint-backend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
|
| jq .head.repo.fork)
|
|
- if [ "$is_fork" != false ]; then return 1; fi
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
../grafana-enterprise
|
|
- cd ../grafana-enterprise
|
|
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
|
|
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
|
|
else git checkout main; fi
|
|
- cd ../
|
|
- ln -s src grafana
|
|
- cd ./grafana-enterprise
|
|
- ./build.sh
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- clone-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- apt-get update && apt-get install make
|
|
- make lint-go
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
CGO_ENABLED: "1"
|
|
image: golang:1.19.4
|
|
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/**
|
|
- .bingo/**
|
|
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: pr-build-e2e
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- 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
|
|
image: grafana/build-container:v1.7.1
|
|
name: trigger-test-release
|
|
when:
|
|
paths:
|
|
include:
|
|
- .drone.yml
|
|
- pkg/build/**
|
|
repo:
|
|
- grafana/grafana
|
|
- 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
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- commands:
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend
|
|
- commands:
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend-packages
|
|
- commands:
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment: null
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- . scripts/build/gpg-test-vars.sh && ./bin/build package --jobs 8 --edition oss
|
|
--build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment: null
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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/azuremonitor/**
|
|
- e2e/cloud-plugins-suite/azure-monitor.spec.ts
|
|
repo:
|
|
- grafana/grafana
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- yarn storybook:build
|
|
- ./bin/build verify-storybook
|
|
depends_on:
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-storybook
|
|
when:
|
|
paths:
|
|
include:
|
|
- packages/grafana-ui/**
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
name: copy-packages-for-docker
|
|
- commands:
|
|
- yarn wait-on http://$HOST:$PORT
|
|
- pa11y-ci --config .pa11yci-pr.conf.js
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
GRAFANA_MISC_STATS_API_KEY:
|
|
from_secret: grafana_misc_stats_api_key
|
|
HOST: grafana-server
|
|
PORT: 3001
|
|
failure: always
|
|
image: grafana/docker-puppeteer:1.1.0
|
|
name: test-a11y-frontend
|
|
- commands:
|
|
- ./bin/build build-docker --edition oss -archs amd64
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: google/cloud-sdk
|
|
name: build-docker-images
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
trigger:
|
|
event:
|
|
- pull_request
|
|
paths:
|
|
exclude:
|
|
- '*.md'
|
|
- docs/**
|
|
- latest.json
|
|
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: pr-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
|
|
volumes:
|
|
- name: mysql
|
|
path: /var/lib/mysql
|
|
steps:
|
|
- commands:
|
|
- is_fork=$(curl "https://$GITHUB_TOKEN@api.github.com/repos/grafana/grafana/pulls/$DRONE_PULL_REQUEST"
|
|
| jq .head.repo.fork)
|
|
- if [ "$is_fork" != false ]; then return 1; fi
|
|
- git clone "https://$${GITHUB_TOKEN}@github.com/grafana/grafana-enterprise.git"
|
|
../grafana-enterprise
|
|
- cd ../grafana-enterprise
|
|
- if git checkout ${DRONE_SOURCE_BRANCH}; then echo "checked out ${DRONE_SOURCE_BRANCH}";
|
|
elif git checkout ${DRONE_TARGET_BRANCH}; then echo "git checkout ${DRONE_TARGET_BRANCH}";
|
|
else git checkout main; fi
|
|
- cd ../
|
|
- ln -s src grafana
|
|
- cd ./grafana-enterprise
|
|
- ./build.sh
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- '# It is required that code generated from Thema/CUE be committed and in sync
|
|
with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
depends_on:
|
|
- clone-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- clone-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-integration-tests
|
|
trigger:
|
|
event:
|
|
- pull_request
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- '*.md'
|
|
include:
|
|
- pkg/**
|
|
- packaging/**
|
|
- .drone.yml
|
|
- conf/**
|
|
- go.sum
|
|
- go.mod
|
|
- public/app/plugins/**/plugin.json
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
- name: postgres
|
|
temp:
|
|
medium: memory
|
|
- name: mysql
|
|
temp:
|
|
medium: memory
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: pr-docs
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- |-
|
|
echo -e "unknwon
|
|
referer
|
|
errorstring
|
|
eror
|
|
iam
|
|
wan" > words_to_ignore.txt
|
|
- codespell -I words_to_ignore.txt docs/
|
|
- rm words_to_ignore.txt
|
|
image: grafana/build-container:v1.7.1
|
|
name: codespell
|
|
- commands:
|
|
- yarn run prettier:checkDocs
|
|
depends_on:
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: lint-docs
|
|
- commands:
|
|
- mkdir -p /hugo/content/docs/grafana/latest
|
|
- 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:
|
|
- '*.md'
|
|
- docs/**
|
|
- packages/**/*.md
|
|
- latest.json
|
|
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: 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
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build shellcheck
|
|
depends_on:
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-docs
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- |-
|
|
echo -e "unknwon
|
|
referer
|
|
errorstring
|
|
eror
|
|
iam
|
|
wan" > words_to_ignore.txt
|
|
- codespell -I words_to_ignore.txt docs/
|
|
- rm words_to_ignore.txt
|
|
image: grafana/build-container:v1.7.1
|
|
name: codespell
|
|
- commands:
|
|
- yarn run prettier:checkDocs
|
|
depends_on:
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: lint-docs
|
|
- commands:
|
|
- mkdir -p /hugo/content/docs/grafana/latest
|
|
- 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
|
|
paths:
|
|
include:
|
|
- '*.md'
|
|
- docs/**
|
|
- packages/**/*.md
|
|
- latest.json
|
|
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: main-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- yarn-install
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-lint-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
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%
|
|
image: grafana/build-container:v1.7.1
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-test-backend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
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.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- apt-get update && apt-get install make
|
|
- make lint-go
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
CGO_ENABLED: "1"
|
|
image: golang:1.19.4
|
|
name: lint-backend
|
|
- commands:
|
|
- ./bin/build verify-drone
|
|
depends_on:
|
|
- compile-build-cmd
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: lint-drone
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- commands:
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend
|
|
- commands:
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend-packages
|
|
- commands:
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --sign
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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/azuremonitor/**
|
|
- e2e/cloud-plugins-suite/azure-monitor.spec.ts
|
|
repo:
|
|
- grafana/grafana
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- yarn storybook:build
|
|
- ./bin/build verify-storybook
|
|
depends_on:
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-storybook
|
|
when:
|
|
paths:
|
|
include:
|
|
- packages/grafana-ui/**
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
image: grafana/docker-puppeteer:1.1.0
|
|
name: test-a11y-frontend
|
|
- commands:
|
|
- ./bin/build store-storybook --deployment canary
|
|
depends_on:
|
|
- build-storybook
|
|
- 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:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: store-storybook
|
|
when:
|
|
paths:
|
|
include:
|
|
- packages/grafana-ui/**
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./scripts/ci-frontend-metrics.sh | ./bin/build publish-metrics $${GRAFANA_MISC_STATS_API_KEY}
|
|
depends_on:
|
|
- test-a11y-frontend
|
|
environment:
|
|
GRAFANA_MISC_STATS_API_KEY:
|
|
from_secret: grafana_misc_stats_api_key
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: publish-frontend-metrics
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/build build-docker --edition oss
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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 oss --ubuntu
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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/grabpl artifacts docker publish --dockerhub-repo grafana/grafana
|
|
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
|
|
name: publish-images-grafana
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-oss
|
|
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
|
|
name: publish-images-grafana-oss
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./scripts/circle-release-canary-packages.sh
|
|
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:
|
|
NPM_TOKEN:
|
|
from_secret: npm_token
|
|
image: grafana/build-container:v1.7.1
|
|
name: release-canary-npm-packages
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/build upload-packages --edition oss
|
|
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:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-packages
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/build upload-cdn --edition oss
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-cdn-assets
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
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: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-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
|
|
volumes:
|
|
- name: mysql
|
|
path: /var/lib/mysql
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- '# It is required that code generated from Thema/CUE be committed and in sync
|
|
with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-integration-tests
|
|
trigger:
|
|
branch: main
|
|
event:
|
|
- push
|
|
paths:
|
|
exclude:
|
|
- '*.md'
|
|
- docs/**
|
|
- latest.json
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
- name: postgres
|
|
temp:
|
|
medium: memory
|
|
- name: mysql
|
|
temp:
|
|
medium: memory
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on:
|
|
- main-test-frontend
|
|
- main-test-backend
|
|
- main-build-e2e-publish
|
|
- main-integration-tests
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: main-windows
|
|
platform:
|
|
arch: amd64
|
|
os: windows
|
|
version: "1809"
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
image: mcr.microsoft.com/windows:1809
|
|
name: identify-runner
|
|
- commands:
|
|
- $$ProgressPreference = "SilentlyContinue"
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
|
|
-OutFile grabpl.exe
|
|
image: grafana/ci-wix:0.1.1
|
|
name: windows-init
|
|
- commands:
|
|
- $$gcpKey = $$env:GCP_KEY
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
> gcpkey.json'
|
|
- dos2unix gcpkey.json
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
- rm gcpkey.json
|
|
- cp C:\App\nssm-2.24.zip .
|
|
- .\grabpl.exe windows-installer --edition oss --build-id $$env:DRONE_BUILD_NUMBER
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
|
- gsutil cp $$fname gs://grafana-downloads/oss/main/
|
|
- gsutil cp "$$fname.sha256" gs://grafana-downloads/oss/main/
|
|
depends_on:
|
|
- 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:
|
|
branch: main
|
|
event:
|
|
- push
|
|
paths:
|
|
exclude:
|
|
- '*.md'
|
|
- docs/**
|
|
- latest.json
|
|
repo:
|
|
- grafana/grafana
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
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
|
|
repo:
|
|
- grafana/grafana
|
|
type: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on:
|
|
- main-build-e2e-publish
|
|
- main-integration-tests
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
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:
|
|
- main-test-frontend
|
|
- main-test-backend
|
|
- main-build-e2e-publish
|
|
- main-integration-tests
|
|
- main-windows
|
|
kind: pipeline
|
|
name: main-notify
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
steps:
|
|
- image: plugins/slack
|
|
name: slack
|
|
settings:
|
|
channel: grafana-ci-notifications
|
|
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}}
|
|
webhook:
|
|
from_secret: slack_webhook
|
|
trigger:
|
|
branch: main
|
|
event:
|
|
- push
|
|
paths:
|
|
exclude:
|
|
- '*.md'
|
|
- docs/**
|
|
- latest.json
|
|
status:
|
|
- failure
|
|
type: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-oss-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- 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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition oss ${DRONE_TAG}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- commands:
|
|
- ./bin/build build-frontend --jobs 8 --edition oss ${DRONE_TAG}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend
|
|
- commands:
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss ${DRONE_TAG}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend-packages
|
|
- commands:
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition oss --sign ${DRONE_TAG}
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
name: copy-packages-for-docker
|
|
- commands:
|
|
- ./bin/build build-docker --edition oss --shouldSave
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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 oss --shouldSave --ubuntu
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: google/cloud-sdk
|
|
name: build-docker-images-ubuntu
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- yarn storybook:build
|
|
- ./bin/build verify-storybook
|
|
depends_on:
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-storybook
|
|
when:
|
|
event:
|
|
- tag
|
|
- commands:
|
|
- ./bin/build upload-cdn --edition oss
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-cdn-assets
|
|
- commands:
|
|
- ./bin/build upload-packages --edition oss
|
|
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:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-packages
|
|
- commands:
|
|
- ./bin/build store-storybook --deployment latest
|
|
- ./bin/build store-storybook --deployment ${DRONE_TAG}
|
|
depends_on:
|
|
- build-storybook
|
|
- 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:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: store-storybook
|
|
when:
|
|
event:
|
|
- tag
|
|
- commands:
|
|
- ./bin/build artifacts npm store --tag ${DRONE_TAG}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- build-frontend-packages
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/build-container:v1.7.1
|
|
name: store-npm-packages
|
|
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:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-oss-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- yarn-install
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
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.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
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-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
|
|
volumes:
|
|
- name: mysql
|
|
path: /var/lib/mysql
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- '# It is required that code generated from Thema/CUE be committed and in sync
|
|
with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-integration-tests
|
|
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:
|
|
retries: 3
|
|
depends_on:
|
|
- release-oss-build-e2e-publish
|
|
- release-oss-test-frontend
|
|
- release-oss-test-backend
|
|
- release-oss-integration-tests
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-oss-windows
|
|
platform:
|
|
arch: amd64
|
|
os: windows
|
|
version: "1809"
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
image: mcr.microsoft.com/windows:1809
|
|
name: identify-runner
|
|
- commands:
|
|
- $$ProgressPreference = "SilentlyContinue"
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
|
|
-OutFile grabpl.exe
|
|
image: grafana/ci-wix:0.1.1
|
|
name: windows-init
|
|
- commands:
|
|
- $$gcpKey = $$env:GCP_KEY
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
> gcpkey.json'
|
|
- dos2unix gcpkey.json
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
- rm gcpkey.json
|
|
- cp C:\App\nssm-2.24.zip .
|
|
- .\grabpl.exe windows-installer --edition oss ${DRONE_TAG}
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
|
- 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/
|
|
depends_on:
|
|
- 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: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-enterprise-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise ${DRONE_TAG}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- 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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition enterprise --sign ${DRONE_TAG}
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
name: copy-packages-for-docker
|
|
- commands:
|
|
- ./bin/build build-docker --edition enterprise --shouldSave
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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 enterprise --shouldSave --ubuntu
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: google/cloud-sdk
|
|
name: build-docker-images-ubuntu
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
RUNDIR: scripts/grafana-server/tmp-grafana-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- ./bin/build upload-cdn --edition enterprise
|
|
depends_on:
|
|
- package
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-cdn-assets
|
|
- commands:
|
|
- ./bin/build upload-packages --edition enterprise
|
|
depends_on:
|
|
- package
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-packages
|
|
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: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-enterprise-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- 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:v1.7.1
|
|
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:v1.7.1
|
|
name: init-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- init-enterprise
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- init-enterprise
|
|
- yarn-install
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
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:
|
|
- 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:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- 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:v1.7.1
|
|
name: init-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on:
|
|
- init-enterprise
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
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-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
|
|
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
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
name: init-enterprise
|
|
- 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:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-integration-tests
|
|
- commands:
|
|
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
|
- go clean -testcache
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
REDIS_URL: redis://redis:6379/0
|
|
image: grafana/build-container:v1.7.1
|
|
name: redis-integration-tests
|
|
- commands:
|
|
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
|
- go clean -testcache
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
MEMCACHED_HOSTS: memcached:11211
|
|
image: grafana/build-container:v1.7.1
|
|
name: memcached-integration-tests
|
|
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:
|
|
- release-enterprise-build-e2e-publish
|
|
- release-enterprise-test-frontend
|
|
- release-enterprise-test-backend
|
|
- release-enterprise-integration-tests
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-enterprise-windows
|
|
platform:
|
|
arch: amd64
|
|
os: windows
|
|
version: "1809"
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
image: mcr.microsoft.com/windows:1809
|
|
name: identify-runner
|
|
- commands:
|
|
- $$ProgressPreference = "SilentlyContinue"
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
|
|
-OutFile grabpl.exe
|
|
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
|
- cd grafana-enterprise
|
|
- git checkout ${DRONE_TAG}
|
|
environment:
|
|
GITHUB_TOKEN:
|
|
from_secret: github_token
|
|
image: grafana/ci-wix:0.1.1
|
|
name: clone
|
|
- commands:
|
|
- 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
|
|
name: windows-init
|
|
- commands:
|
|
- $$gcpKey = $$env:GCP_KEY
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
> gcpkey.json'
|
|
- dos2unix gcpkey.json
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
- rm gcpkey.json
|
|
- cp C:\App\nssm-2.24.zip .
|
|
- .\grabpl.exe windows-installer --edition enterprise ${DRONE_TAG}
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
|
- 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/
|
|
depends_on:
|
|
- 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
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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:
|
|
- custom
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
- name: postgres
|
|
temp:
|
|
medium: memory
|
|
- name: mysql
|
|
temp:
|
|
medium: memory
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-docker-oss-public
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build artifacts docker fetch --edition oss
|
|
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-oss
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana --version-tag
|
|
${DRONE_TAG}
|
|
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
|
|
name: publish-images-grafana
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./bin/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-oss --version-tag
|
|
${DRONE_TAG}
|
|
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
|
|
name: publish-images-grafana-oss
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-docker-enterprise-public
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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/grabpl artifacts docker publish --dockerhub-repo grafana/grafana-enterprise
|
|
--version-tag ${DRONE_TAG}
|
|
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
|
|
name: publish-images-grafana-enterprise
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-docker-enterprise-security
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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/grabpl artifacts docker publish --security --dockerhub-repo grafana/grafana-enterprise
|
|
--version-tag ${DRONE_TAG}
|
|
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
|
|
name: publish-images-grafana-enterprise
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- security
|
|
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-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.4
|
|
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.4
|
|
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
|
|
---
|
|
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.4
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: all
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-artifacts-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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build artifacts publish --security --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
environment:
|
|
ENTERPRISE2_SECURITY_PREFIX:
|
|
from_secret: enterprise2_security_prefix
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
SECURITY_DEST_BUCKET:
|
|
from_secret: security_dest_bucket
|
|
STATIC_ASSET_EDITIONS:
|
|
from_secret: static_asset_editions
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: publish-artifacts
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- security
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: all
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-artifacts-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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build artifacts publish --tag $${DRONE_TAG} --src-bucket $${PRERELEASE_BUCKET}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
environment:
|
|
ENTERPRISE2_SECURITY_PREFIX:
|
|
from_secret: enterprise2_security_prefix
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
SECURITY_DEST_BUCKET:
|
|
from_secret: security_dest_bucket
|
|
STATIC_ASSET_EDITIONS:
|
|
from_secret: static_asset_editions
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: publish-artifacts
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: all
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-npm-packages-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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- ./bin/build artifacts npm retrieve --tag ${DRONE_TAG}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
failure: ignore
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: retrieve-npm-packages
|
|
- commands:
|
|
- ./bin/build artifacts npm release --tag ${DRONE_TAG}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- retrieve-npm-packages
|
|
environment:
|
|
NPM_TOKEN:
|
|
from_secret: npm_token
|
|
failure: ignore
|
|
image: grafana/build-container:v1.7.1
|
|
name: release-npm-packages
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on:
|
|
- publish-artifacts-public
|
|
- publish-docker-oss-public
|
|
- publish-docker-enterprise-public
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-packages-oss
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- depends_on:
|
|
- grabpl
|
|
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
|
name: publish-linux-packages-deb
|
|
privileged: true
|
|
settings:
|
|
access_key_id:
|
|
from_secret: packages_access_key_id
|
|
deb_distribution: auto
|
|
gpg_passphrase:
|
|
from_secret: packages_gpg_passphrase
|
|
gpg_private_key:
|
|
from_secret: packages_gpg_private_key
|
|
gpg_public_key:
|
|
from_secret: packages_gpg_public_key
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/oss/**.deb
|
|
secret_access_key:
|
|
from_secret: packages_secret_access_key
|
|
service_account_json:
|
|
from_secret: packages_service_account
|
|
target_bucket: grafana-packages
|
|
- 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
|
|
deb_distribution: auto
|
|
gpg_passphrase:
|
|
from_secret: packages_gpg_passphrase
|
|
gpg_private_key:
|
|
from_secret: packages_gpg_private_key
|
|
gpg_public_key:
|
|
from_secret: packages_gpg_public_key
|
|
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
|
|
- 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
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
type: docker
|
|
volumes:
|
|
- host:
|
|
path: /var/run/docker.sock
|
|
name: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on:
|
|
- publish-artifacts-public
|
|
- publish-docker-oss-public
|
|
- publish-docker-enterprise-public
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: publish-packages-enterprise
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- depends_on:
|
|
- grabpl
|
|
image: us.gcr.io/kubernetes-dev/package-publish:latest
|
|
name: publish-linux-packages-deb
|
|
privileged: true
|
|
settings:
|
|
access_key_id:
|
|
from_secret: packages_access_key_id
|
|
deb_distribution: auto
|
|
gpg_passphrase:
|
|
from_secret: packages_gpg_passphrase
|
|
gpg_private_key:
|
|
from_secret: packages_gpg_private_key
|
|
gpg_public_key:
|
|
from_secret: packages_gpg_public_key
|
|
package_path: gs://grafana-prerelease/artifacts/downloads/*${DRONE_TAG}/enterprise/**.deb
|
|
secret_access_key:
|
|
from_secret: packages_secret_access_key
|
|
service_account_json:
|
|
from_secret: packages_service_account
|
|
target_bucket: grafana-packages
|
|
- 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
|
|
deb_distribution: auto
|
|
gpg_passphrase:
|
|
from_secret: packages_gpg_passphrase
|
|
gpg_private_key:
|
|
from_secret: packages_gpg_private_key
|
|
gpg_public_key:
|
|
from_secret: packages_gpg_public_key
|
|
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
|
|
- 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
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target:
|
|
- public
|
|
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: publish-artifacts-page
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- 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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build artifacts-page
|
|
depends_on:
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: artifacts-page
|
|
trigger:
|
|
event:
|
|
- promote
|
|
target: security
|
|
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-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- 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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- commands:
|
|
- ./bin/build build-frontend --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend
|
|
- commands:
|
|
- ./bin/build build-frontend-packages --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=8192
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-frontend-packages
|
|
- commands:
|
|
- ./bin/build build-plugins --jobs 8 --edition oss
|
|
depends_on:
|
|
- compile-build-cmd
|
|
- yarn-install
|
|
environment:
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition oss --build-id ${DRONE_BUILD_NUMBER} --sign
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
name: copy-packages-for-docker
|
|
- commands:
|
|
- ./bin/build build-docker --edition oss --shouldSave
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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 oss --shouldSave --ubuntu
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: google/cloud-sdk
|
|
name: build-docker-images-ubuntu
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- yarn storybook:build
|
|
- ./bin/build verify-storybook
|
|
depends_on:
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
NODE_OPTIONS: --max_old_space_size=4096
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-storybook
|
|
when:
|
|
paths:
|
|
include:
|
|
- packages/grafana-ui/**
|
|
- commands:
|
|
- ./bin/build upload-cdn --edition oss
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-cdn-assets
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/build upload-packages --edition oss
|
|
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:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-packages
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on: []
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-branch-oss-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- yarn-install
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
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.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
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-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
|
|
volumes:
|
|
- name: mysql
|
|
path: /var/lib/mysql
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- '# It is required that code generated from Thema/CUE be committed and in sync
|
|
with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-cue
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on: []
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
depends_on:
|
|
- release-branch-oss-build-e2e-publish
|
|
- release-branch-oss-test-frontend
|
|
- release-branch-oss-test-backend
|
|
- release-branch-oss-integration-tests
|
|
environment:
|
|
EDITION: oss
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-branch-oss-windows
|
|
platform:
|
|
arch: amd64
|
|
os: windows
|
|
version: "1809"
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
image: mcr.microsoft.com/windows:1809
|
|
name: identify-runner
|
|
- commands:
|
|
- $$ProgressPreference = "SilentlyContinue"
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
|
|
-OutFile grabpl.exe
|
|
image: grafana/ci-wix:0.1.1
|
|
name: windows-init
|
|
- commands:
|
|
- $$gcpKey = $$env:GCP_KEY
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
> gcpkey.json'
|
|
- dos2unix gcpkey.json
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
- rm gcpkey.json
|
|
- cp C:\App\nssm-2.24.zip .
|
|
depends_on:
|
|
- 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:
|
|
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-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- ./bin/build build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
|
depends_on:
|
|
- wire-install
|
|
- compile-build-cmd
|
|
image: grafana/build-container:v1.7.1
|
|
name: build-backend
|
|
- 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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
name: build-plugins
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
|
|
--sign
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
name: package
|
|
- commands:
|
|
- ls dist/*.tar.gz*
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
depends_on:
|
|
- package
|
|
image: grafana/build-container:v1.7.1
|
|
name: copy-packages-for-docker
|
|
- commands:
|
|
- ./bin/build build-docker --edition enterprise --shouldSave
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
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 enterprise --shouldSave --ubuntu
|
|
depends_on:
|
|
- copy-packages-for-docker
|
|
- compile-build-cmd
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
image: google/cloud-sdk
|
|
name: build-docker-images-ubuntu
|
|
volumes:
|
|
- name: docker
|
|
path: /var/run/docker.sock
|
|
- commands:
|
|
- ./scripts/grafana-server/start-server
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
detach: true
|
|
environment:
|
|
ARCH: linux-amd64
|
|
PORT: 3001
|
|
RUNDIR: scripts/grafana-server/tmp-grafana-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: grafana-server
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-dashboards-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-smoke-tests-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite panels-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-panels-suite
|
|
- commands:
|
|
- apt-get install -y netcat
|
|
- ./bin/build e2e-tests --port 3001 --suite various-suite --tries 3
|
|
depends_on:
|
|
- grafana-server
|
|
environment:
|
|
HOST: grafana-server
|
|
image: cypress/included:9.5.1-node16.14.0-slim-chrome99-ff97
|
|
name: end-to-end-tests-various-suite
|
|
- 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
|
|
failure: ignore
|
|
image: google/cloud-sdk:406.0.0
|
|
name: e2e-tests-artifacts-upload
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
- commands:
|
|
- ./bin/build upload-cdn --edition enterprise
|
|
depends_on:
|
|
- package
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-cdn-assets
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
- commands:
|
|
- ./bin/build upload-packages --edition enterprise
|
|
depends_on:
|
|
- package
|
|
environment:
|
|
GCP_KEY:
|
|
from_secret: gcp_key
|
|
PRERELEASE_BUCKET:
|
|
from_secret: prerelease_bucket
|
|
image: grafana/grafana-ci-deploy:1.3.3
|
|
name: upload-packages
|
|
when:
|
|
repo:
|
|
- grafana/grafana
|
|
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
|
|
---
|
|
clone:
|
|
disable: true
|
|
depends_on: []
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-branch-enterprise-test-frontend
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- 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:v1.7.1
|
|
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:v1.7.1
|
|
name: init-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: yarn-install
|
|
- commands:
|
|
- yarn betterer ci
|
|
depends_on:
|
|
- init-enterprise
|
|
- yarn-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: betterer-frontend
|
|
- commands:
|
|
- yarn run ci:test-frontend
|
|
depends_on:
|
|
- init-enterprise
|
|
- yarn-install
|
|
environment:
|
|
TEST_MAX_WORKERS: 50%
|
|
image: grafana/build-container:v1.7.1
|
|
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:
|
|
- 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:v1.7.1
|
|
name: clone-enterprise
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- 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:v1.7.1
|
|
name: init-enterprise
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
name: identify-runner
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on:
|
|
- init-enterprise
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
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:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend
|
|
- commands:
|
|
- go test -run Integration -covermode=atomic -timeout=5m ./pkg/...
|
|
depends_on:
|
|
- wire-install
|
|
image: grafana/build-container:v1.7.1
|
|
name: test-backend-integration
|
|
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-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
|
|
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
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
name: init-enterprise
|
|
- 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:v1.7.1
|
|
name: verify-gen-cue
|
|
- commands:
|
|
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
|
|
- '# The following command will fail if running code generators produces any diff
|
|
in output.'
|
|
- CODEGEN_VERIFY=1 make gen-jsonnet
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: verify-gen-jsonnet
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- verify-gen-cue
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- 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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: postgres
|
|
PGPASSWORD: grafanatest
|
|
POSTGRES_HOST: postgres
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
GRAFANA_TEST_DB: mysql
|
|
MYSQL_HOST: mysql
|
|
image: grafana/build-container:v1.7.1
|
|
name: mysql-integration-tests
|
|
- commands:
|
|
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
|
- go clean -testcache
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
REDIS_URL: redis://redis:6379/0
|
|
image: grafana/build-container:v1.7.1
|
|
name: redis-integration-tests
|
|
- commands:
|
|
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
|
- go clean -testcache
|
|
- go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
|
|
-timeout=5m {}'
|
|
depends_on:
|
|
- wire-install
|
|
environment:
|
|
MEMCACHED_HOSTS: memcached:11211
|
|
image: grafana/build-container:v1.7.1
|
|
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
|
|
---
|
|
clone:
|
|
disable: true
|
|
depends_on:
|
|
- release-branch-enterprise-build-e2e-publish
|
|
- release-branch-enterprise-test-frontend
|
|
- release-branch-enterprise-test-backend
|
|
- release-branch-enterprise-integration-tests
|
|
environment:
|
|
EDITION: enterprise
|
|
image_pull_secrets:
|
|
- dockerconfigjson
|
|
kind: pipeline
|
|
name: release-branch-enterprise-windows
|
|
platform:
|
|
arch: amd64
|
|
os: windows
|
|
version: "1809"
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- echo $env:DRONE_RUNNER_NAME
|
|
image: mcr.microsoft.com/windows:1809
|
|
name: identify-runner
|
|
- commands:
|
|
- $$ProgressPreference = "SilentlyContinue"
|
|
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/windows/grabpl.exe
|
|
-OutFile grabpl.exe
|
|
- 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
|
|
name: clone
|
|
- commands:
|
|
- 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
|
|
name: windows-init
|
|
- commands:
|
|
- $$gcpKey = $$env:GCP_KEY
|
|
- '[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($$gcpKey))
|
|
> gcpkey.json'
|
|
- dos2unix gcpkey.json
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
- rm gcpkey.json
|
|
- cp C:\App\nssm-2.24.zip .
|
|
depends_on:
|
|
- 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:
|
|
ref:
|
|
- refs/heads/v[0-9]*
|
|
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-branch-enterprise2-build-e2e-publish
|
|
node:
|
|
type: no-parallel
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
services: []
|
|
steps:
|
|
- commands:
|
|
- mkdir -p bin
|
|
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.21/grabpl
|
|
- chmod +x bin/grabpl
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
name: grabpl
|
|
- commands:
|
|
- echo $DRONE_RUNNER_NAME
|
|
image: alpine:3.17.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- make gen-go
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
name: wire-install
|
|
- commands:
|
|
- yarn install --immutable
|
|
depends_on:
|
|
- init-enterprise
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
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:v1.7.1
|
|
name: build-backend-enterprise2
|
|
- commands:
|
|
- ./bin/build package --jobs 8 --edition enterprise2 --build-id ${DRONE_BUILD_NUMBER}
|
|
--sign
|
|
depends_on:
|
|
- build-plugins
|
|
- build-backend-enterprise2
|
|
- build-frontend
|
|
- build-frontend-packages
|
|
environment:
|
|
GPG_KEY_PASSWORD:
|
|
from_secret: packages_gpg_passphrase
|
|
GPG_PRIV_KEY:
|
|
from_secret: packages_gpg_private_key
|
|
GPG_PUB_KEY:
|
|
from_secret: packages_gpg_public_key
|
|
GRAFANA_API_KEY:
|
|
from_secret: grafana_api_key
|
|
image: grafana/build-container:v1.7.1
|
|
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:v1.7.1
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
kind: pipeline
|
|
name: scan-grafana/grafana:latest-image
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
steps:
|
|
- commands:
|
|
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana:latest
|
|
image: aquasec/trivy:0.21.0
|
|
name: scan-unkown-low-medium-vulnerabilities
|
|
- commands:
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
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:
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
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:
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:latest-ubuntu
|
|
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
|
|
---
|
|
clone:
|
|
retries: 3
|
|
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:
|
|
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana:main-ubuntu
|
|
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-ubuntu failed:
|
|
{{build.link}}'
|
|
webhook:
|
|
from_secret: slack_webhook_backend
|
|
when:
|
|
status: failure
|
|
trigger:
|
|
cron: nightly
|
|
event: cron
|
|
type: docker
|
|
---
|
|
clone:
|
|
retries: 3
|
|
kind: pipeline
|
|
name: grafana-com-nightly
|
|
platform:
|
|
arch: amd64
|
|
os: linux
|
|
steps:
|
|
- commands:
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
depends_on: []
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
image: golang:1.19.4
|
|
name: compile-build-cmd
|
|
- commands:
|
|
- ./bin/build publish grafana-com --edition oss
|
|
depends_on:
|
|
- compile-build-cmd
|
|
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
|
|
---
|
|
get:
|
|
name: .dockerconfigjson
|
|
path: secret/data/common/gcr
|
|
kind: secret
|
|
name: dockerconfigjson
|
|
---
|
|
get:
|
|
name: pat
|
|
path: infra/data/ci/github/grafanabot
|
|
kind: secret
|
|
name: github_token
|
|
---
|
|
get:
|
|
name: machine-user-token
|
|
path: infra/data/ci/drone
|
|
kind: secret
|
|
name: drone_token
|
|
---
|
|
get:
|
|
name: bucket
|
|
path: infra/data/ci/grafana/prerelease
|
|
kind: secret
|
|
name: prerelease_bucket
|
|
---
|
|
get:
|
|
name: credentials.json
|
|
path: infra/data/ci/grafana/releng/artifacts-uploader-service-account
|
|
kind: secret
|
|
name: gcp_upload_artifacts_key
|
|
---
|
|
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
|
|
---
|
|
get:
|
|
name: public-key-b64
|
|
path: infra/data/ci/packages-publish/gpg
|
|
kind: secret
|
|
name: packages_gpg_public_key
|
|
---
|
|
get:
|
|
name: private-key-b64
|
|
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
|
|
---
|
|
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
|
|
---
|
|
kind: signature
|
|
hmac: 1847568b29364d0ba065b1f65d6536f24f636dbf36ce2cdccf05e8f80e2b9caf
|
|
|
|
...
|