|
|
|
|
@@ -2472,558 +2472,6 @@ environment:
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-whatsnew-checker
|
|
|
|
|
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.20.6
|
|
|
|
|
name: compile-build-cmd
|
|
|
|
|
- commands:
|
|
|
|
|
- ./bin/build whatsnew-checker
|
|
|
|
|
depends_on:
|
|
|
|
|
- compile-build-cmd
|
|
|
|
|
image: golang:1.20.6
|
|
|
|
|
name: whats-new-checker
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-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.40/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:1.7.5
|
|
|
|
|
name: verify-gen-cue
|
|
|
|
|
- commands:
|
|
|
|
|
- make gen-go
|
|
|
|
|
depends_on:
|
|
|
|
|
- verify-gen-cue
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: wire-install
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn install --immutable
|
|
|
|
|
depends_on: []
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: yarn-install
|
|
|
|
|
- commands:
|
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
image: golang:1.20.6
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
name: package
|
|
|
|
|
- commands:
|
|
|
|
|
- ls dist/*.tar.gz*
|
|
|
|
|
- cp dist/*.tar.gz* packaging/docker/
|
|
|
|
|
depends_on:
|
|
|
|
|
- package
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
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_grafanauploads
|
|
|
|
|
image: google/cloud-sdk:431.0.0
|
|
|
|
|
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_grafanauploads
|
|
|
|
|
image: google/cloud-sdk:431.0.0
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:431.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:1.7.5
|
|
|
|
|
name: build-storybook
|
|
|
|
|
when:
|
|
|
|
|
event:
|
|
|
|
|
- tag
|
|
|
|
|
- commands:
|
|
|
|
|
- ./bin/build upload-cdn --edition oss
|
|
|
|
|
depends_on:
|
|
|
|
|
- grafana-server
|
|
|
|
|
environment:
|
|
|
|
|
GCP_KEY:
|
|
|
|
|
from_secret: gcp_grafanauploads
|
|
|
|
|
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_grafanauploads_base64
|
|
|
|
|
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_grafanauploads
|
|
|
|
|
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_upload_artifacts_key
|
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: store-npm-packages
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-test-frontend
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
platform:
|
|
|
|
|
arch: amd64
|
|
|
|
|
os: linux
|
|
|
|
|
services: []
|
|
|
|
|
steps:
|
|
|
|
|
- commands:
|
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
|
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.40/grabpl
|
|
|
|
|
- chmod +x bin/grabpl
|
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
|
name: grabpl
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn install --immutable
|
|
|
|
|
depends_on: []
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: yarn-install
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn betterer ci
|
|
|
|
|
depends_on:
|
|
|
|
|
- yarn-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: betterer-frontend
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn run ci:test-frontend
|
|
|
|
|
depends_on:
|
|
|
|
|
- yarn-install
|
|
|
|
|
environment:
|
|
|
|
|
TEST_MAX_WORKERS: 50%
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-frontend
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-test-backend
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
platform:
|
|
|
|
|
arch: amd64
|
|
|
|
|
os: linux
|
|
|
|
|
services: []
|
|
|
|
|
steps:
|
|
|
|
|
- commands:
|
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
|
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.20.6
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
name: verify-gen-jsonnet
|
|
|
|
|
- commands:
|
|
|
|
|
- make gen-go
|
|
|
|
|
depends_on:
|
|
|
|
|
- verify-gen-cue
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: wire-install
|
|
|
|
|
- commands:
|
|
|
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
|
|
|
depends_on:
|
|
|
|
|
- wire-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-backend
|
|
|
|
|
- commands:
|
|
|
|
|
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
|
|
|
|
|
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
|
|
|
|
|
| grep -o '\(.*\)/' | sort -u)
|
|
|
|
|
depends_on:
|
|
|
|
|
- wire-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-backend-integration
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on:
|
|
|
|
|
- release-build-e2e-publish
|
|
|
|
|
- release-test-frontend
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-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.40/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 --target gs://%PRERELEASE_BUCKET%/artifacts/downloads/${DRONE_TAG}/oss/release/grafana-${DRONE_TAG:1}.windows-amd64.zip
|
|
|
|
|
--edition oss ${DRONE_TAG}
|
|
|
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
|
|
|
|
- gsutil cp $$fname gs://%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_grafanauploads_base64
|
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
|
from_secret: github_token
|
|
|
|
|
PRERELEASE_BUCKET:
|
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
|
image: grafana/ci-wix:0.1.1
|
|
|
|
|
name: build-windows-installer
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: //./pipe/docker_engine/
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: publish-docker-public
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
@@ -3346,13 +2794,13 @@ volumes:
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on:
|
|
|
|
|
- release-build-e2e-publish
|
|
|
|
|
- release-windows
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: verify-prerelease-assets
|
|
|
|
|
name: release-whatsnew-checker
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
platform:
|
|
|
|
|
@@ -3361,21 +2809,157 @@ platform:
|
|
|
|
|
services: []
|
|
|
|
|
steps:
|
|
|
|
|
- commands:
|
|
|
|
|
- apt-get update && apt-get install -yq gettext
|
|
|
|
|
- printenv GCP_KEY | base64 -d > /tmp/key.json
|
|
|
|
|
- gcloud auth activate-service-account --key-file=/tmp/key.json
|
|
|
|
|
- ./scripts/list-release-artifacts.sh ${DRONE_TAG} | xargs -n1 gsutil stat >> /tmp/stat.log
|
|
|
|
|
- '! cat /tmp/stat.log | grep "No URLs matched"'
|
|
|
|
|
depends_on:
|
|
|
|
|
- clone
|
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
BUCKET:
|
|
|
|
|
from_secret: prerelease_bucket
|
|
|
|
|
GCP_KEY:
|
|
|
|
|
from_secret: gcp_key
|
|
|
|
|
failure: ignore
|
|
|
|
|
image: google/cloud-sdk:431.0.0
|
|
|
|
|
name: gsutil-stat
|
|
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
image: golang:1.20.6
|
|
|
|
|
name: compile-build-cmd
|
|
|
|
|
- commands:
|
|
|
|
|
- ./bin/build whatsnew-checker
|
|
|
|
|
depends_on:
|
|
|
|
|
- compile-build-cmd
|
|
|
|
|
image: golang:1.20.6
|
|
|
|
|
name: whats-new-checker
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-test-frontend
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
platform:
|
|
|
|
|
arch: amd64
|
|
|
|
|
os: linux
|
|
|
|
|
services: []
|
|
|
|
|
steps:
|
|
|
|
|
- commands:
|
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
|
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.40/grabpl
|
|
|
|
|
- chmod +x bin/grabpl
|
|
|
|
|
image: byrnedo/alpine-curl:0.1.8
|
|
|
|
|
name: grabpl
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn install --immutable
|
|
|
|
|
depends_on: []
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: yarn-install
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn betterer ci
|
|
|
|
|
depends_on:
|
|
|
|
|
- yarn-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: betterer-frontend
|
|
|
|
|
- commands:
|
|
|
|
|
- yarn run ci:test-frontend
|
|
|
|
|
depends_on:
|
|
|
|
|
- yarn-install
|
|
|
|
|
environment:
|
|
|
|
|
TEST_MAX_WORKERS: 50%
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-frontend
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- promote
|
|
|
|
|
ref:
|
|
|
|
|
exclude:
|
|
|
|
|
- refs/tags/*-cloud*
|
|
|
|
|
include:
|
|
|
|
|
- refs/tags/v*
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
name: docker
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
environment:
|
|
|
|
|
EDITION: oss
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: release-test-backend
|
|
|
|
|
node:
|
|
|
|
|
type: no-parallel
|
|
|
|
|
platform:
|
|
|
|
|
arch: amd64
|
|
|
|
|
os: linux
|
|
|
|
|
services: []
|
|
|
|
|
steps:
|
|
|
|
|
- commands:
|
|
|
|
|
- echo $DRONE_RUNNER_NAME
|
|
|
|
|
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.20.6
|
|
|
|
|
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:1.7.5
|
|
|
|
|
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:1.7.5
|
|
|
|
|
name: verify-gen-jsonnet
|
|
|
|
|
- commands:
|
|
|
|
|
- make gen-go
|
|
|
|
|
depends_on:
|
|
|
|
|
- verify-gen-cue
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: wire-install
|
|
|
|
|
- commands:
|
|
|
|
|
- go test -tags requires_buildifer -short -covermode=atomic -timeout=5m ./pkg/...
|
|
|
|
|
depends_on:
|
|
|
|
|
- wire-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-backend
|
|
|
|
|
- commands:
|
|
|
|
|
- go test -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
|
|
|
|
|
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
|
|
|
|
|
| grep -o '\(.*\)/' | sort -u)
|
|
|
|
|
depends_on:
|
|
|
|
|
- wire-install
|
|
|
|
|
image: grafana/build-container:1.7.5
|
|
|
|
|
name: test-backend-integration
|
|
|
|
|
trigger:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
@@ -3426,7 +3010,7 @@ steps:
|
|
|
|
|
GPG_PUBLIC_KEY:
|
|
|
|
|
from_secret: packages_gpg_public_key
|
|
|
|
|
failure: ignore
|
|
|
|
|
image: grafana/grafana-build:main
|
|
|
|
|
image: grafana/grafana-build:dev-dec7506
|
|
|
|
|
name: rgm-build
|
|
|
|
|
volumes:
|
|
|
|
|
- name: docker
|
|
|
|
|
@@ -3441,6 +3025,8 @@ trigger:
|
|
|
|
|
- docs/**
|
|
|
|
|
- packages/**/*.md
|
|
|
|
|
- latest.json
|
|
|
|
|
repo:
|
|
|
|
|
- grafana/grafana
|
|
|
|
|
type: docker
|
|
|
|
|
volumes:
|
|
|
|
|
- host:
|
|
|
|
|
@@ -3449,7 +3035,9 @@ volumes:
|
|
|
|
|
---
|
|
|
|
|
clone:
|
|
|
|
|
retries: 3
|
|
|
|
|
depends_on: []
|
|
|
|
|
depends_on:
|
|
|
|
|
- release-test-backend
|
|
|
|
|
- release-test-frontend
|
|
|
|
|
image_pull_secrets:
|
|
|
|
|
- dockerconfigjson
|
|
|
|
|
kind: pipeline
|
|
|
|
|
@@ -3480,7 +3068,7 @@ steps:
|
|
|
|
|
GPG_PUBLIC_KEY:
|
|
|
|
|
from_secret: packages_gpg_public_key
|
|
|
|
|
failure: ignore
|
|
|
|
|
image: grafana/grafana-build:main
|
|
|
|
|
image: grafana/grafana-build:dev-dec7506
|
|
|
|
|
name: rgm-build
|
|
|
|
|
volumes:
|
|
|
|
|
- name: docker
|
|
|
|
|
@@ -3534,11 +3122,11 @@ steps:
|
|
|
|
|
- gcloud auth activate-service-account --key-file=gcpkey.json
|
|
|
|
|
- rm gcpkey.json
|
|
|
|
|
- cp C:\App\nssm-2.24.zip .
|
|
|
|
|
- .\grabpl.exe windows-installer --target gs://grafana-prerelease-dev/artifacts/downloads/${DRONE_TAG}/oss/release/grafana-${DRONE_TAG:1}.windows-amd64.zip
|
|
|
|
|
- .\grabpl.exe windows-installer --target gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/grafana-${DRONE_TAG:1}.windows-amd64.zip
|
|
|
|
|
--edition oss ${DRONE_TAG}
|
|
|
|
|
- $$fname = ((Get-Childitem grafana*.msi -name) -split "`n")[0]
|
|
|
|
|
- gsutil cp $$fname gs://grafana-prerelease-dev/artifacts/downloads/${DRONE_TAG}/oss/release/
|
|
|
|
|
- gsutil cp "$$fname.sha256" gs://grafana-prerelease-dev/artifacts/downloads/${DRONE_TAG}/oss/release/
|
|
|
|
|
- gsutil cp $$fname gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
|
|
|
|
|
- gsutil cp "$$fname.sha256" gs://grafana-prerelease/artifacts/downloads/${DRONE_TAG}/oss/release/
|
|
|
|
|
depends_on:
|
|
|
|
|
- windows-init
|
|
|
|
|
environment:
|
|
|
|
|
@@ -3591,7 +3179,7 @@ steps:
|
|
|
|
|
depends_on:
|
|
|
|
|
- clone
|
|
|
|
|
environment:
|
|
|
|
|
BUCKET: grafana-prerelease-dev
|
|
|
|
|
BUCKET: grafana-prerelease
|
|
|
|
|
GCP_KEY:
|
|
|
|
|
from_secret: gcp_key
|
|
|
|
|
failure: ignore
|
|
|
|
|
@@ -4928,13 +4516,13 @@ kind: secret
|
|
|
|
|
name: enterprise2-cdn-path
|
|
|
|
|
---
|
|
|
|
|
get:
|
|
|
|
|
name: gcp_service_account_base64
|
|
|
|
|
name: gcp_service_account_prod_base64
|
|
|
|
|
path: infra/data/ci/grafana-release-eng/rgm
|
|
|
|
|
kind: secret
|
|
|
|
|
name: gcp_key_base64
|
|
|
|
|
---
|
|
|
|
|
get:
|
|
|
|
|
name: destination
|
|
|
|
|
name: destination_prod
|
|
|
|
|
path: infra/data/ci/grafana-release-eng/rgm
|
|
|
|
|
kind: secret
|
|
|
|
|
name: destination
|
|
|
|
|
@@ -4970,6 +4558,6 @@ kind: secret
|
|
|
|
|
name: delivery-bot-app-private-key
|
|
|
|
|
---
|
|
|
|
|
kind: signature
|
|
|
|
|
hmac: cc3cdda004221d95f32b2753fa6c1d4fde277abaeee96ca6e6287b5c100fb52e
|
|
|
|
|
hmac: 5ff56da475af5dde19d69bc7b5db89bf64b50d6738091b926f17c8860b7eadd3
|
|
|
|
|
|
|
|
|
|
...
|
|
|
|
|
|