|
|
|
@ -2372,12 +2372,6 @@ volumes: |
|
|
|
|
- host: |
|
|
|
|
path: /var/run/docker.sock |
|
|
|
|
name: docker |
|
|
|
|
- name: postgres |
|
|
|
|
temp: |
|
|
|
|
medium: memory |
|
|
|
|
- name: mysql |
|
|
|
|
temp: |
|
|
|
|
medium: memory |
|
|
|
|
--- |
|
|
|
|
clone: |
|
|
|
|
retries: 3 |
|
|
|
@ -2510,132 +2504,12 @@ volumes: |
|
|
|
|
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.30/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:1.7.2 |
|
|
|
|
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.2 |
|
|
|
|
name: verify-gen-jsonnet |
|
|
|
|
- commands: |
|
|
|
|
- make gen-go |
|
|
|
|
depends_on: |
|
|
|
|
- verify-gen-cue |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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: |
|
|
|
@ -2983,12 +2857,6 @@ volumes: |
|
|
|
|
- host: |
|
|
|
|
path: /var/run/docker.sock |
|
|
|
|
name: docker |
|
|
|
|
- name: postgres |
|
|
|
|
temp: |
|
|
|
|
medium: memory |
|
|
|
|
- name: mysql |
|
|
|
|
temp: |
|
|
|
|
medium: memory |
|
|
|
|
--- |
|
|
|
|
clone: |
|
|
|
|
disable: true |
|
|
|
@ -3185,45 +3053,102 @@ volumes: |
|
|
|
|
--- |
|
|
|
|
clone: |
|
|
|
|
disable: true |
|
|
|
|
depends_on: [] |
|
|
|
|
depends_on: |
|
|
|
|
- release-enterprise-build-e2e-publish |
|
|
|
|
- release-enterprise-test-frontend |
|
|
|
|
- release-enterprise-test-backend |
|
|
|
|
environment: |
|
|
|
|
EDITION: enterprise |
|
|
|
|
image_pull_secrets: |
|
|
|
|
- dockerconfigjson |
|
|
|
|
kind: pipeline |
|
|
|
|
name: release-enterprise-integration-tests |
|
|
|
|
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.30/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: |
|
|
|
|
- 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 |
|
|
|
|
services: [] |
|
|
|
|
steps: |
|
|
|
|
- commands: |
|
|
|
|
- mkdir -p bin |
|
|
|
@ -3261,245 +3186,13 @@ steps: |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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 |
|
|
|
|
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd |
|
|
|
|
depends_on: |
|
|
|
|
- init-enterprise |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
name: verify-gen-jsonnet |
|
|
|
|
- commands: |
|
|
|
|
- make gen-go |
|
|
|
|
depends_on: |
|
|
|
|
- verify-gen-cue |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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.30/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.30/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:1.7.2 |
|
|
|
|
name: clone-enterprise |
|
|
|
|
- commands: |
|
|
|
|
- mv bin/grabpl /tmp/ |
|
|
|
|
- rmdir bin |
|
|
|
|
- mv grafana-enterprise /tmp/ |
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise |
|
|
|
|
${DRONE_TAG} |
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json |
|
|
|
|
- mkdir bin |
|
|
|
|
- mv /tmp/grabpl bin/ |
|
|
|
|
depends_on: |
|
|
|
|
- clone-enterprise |
|
|
|
|
environment: |
|
|
|
|
GITHUB_TOKEN: |
|
|
|
|
from_secret: github_token |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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.20.1 |
|
|
|
|
name: compile-build-cmd |
|
|
|
|
environment: |
|
|
|
|
CGO_ENABLED: 0 |
|
|
|
|
image: golang:1.20.1 |
|
|
|
|
name: compile-build-cmd |
|
|
|
|
- commands: |
|
|
|
|
- make gen-go |
|
|
|
|
depends_on: |
|
|
|
@ -5317,7 +5010,6 @@ 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: |
|
|
|
@ -6029,7 +5721,6 @@ 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: |
|
|
|
@ -6348,6 +6039,295 @@ volumes: |
|
|
|
|
temp: |
|
|
|
|
medium: memory |
|
|
|
|
--- |
|
|
|
|
clone: |
|
|
|
|
retries: 3 |
|
|
|
|
depends_on: [] |
|
|
|
|
environment: |
|
|
|
|
EDITION: oss |
|
|
|
|
image_pull_secrets: |
|
|
|
|
- dockerconfigjson |
|
|
|
|
kind: pipeline |
|
|
|
|
name: integration-tests-oss |
|
|
|
|
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.30/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:1.7.2 |
|
|
|
|
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.2 |
|
|
|
|
name: verify-gen-jsonnet |
|
|
|
|
- commands: |
|
|
|
|
- make gen-go |
|
|
|
|
depends_on: |
|
|
|
|
- verify-gen-cue |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
name: mysql-integration-tests |
|
|
|
|
trigger: |
|
|
|
|
event: |
|
|
|
|
- promote |
|
|
|
|
target: integration-tests |
|
|
|
|
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: integration-tests-enterprise |
|
|
|
|
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.30/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:1.7.2 |
|
|
|
|
name: clone-enterprise |
|
|
|
|
- commands: |
|
|
|
|
- mv bin/grabpl /tmp/ |
|
|
|
|
- rmdir bin |
|
|
|
|
- mv grafana-enterprise /tmp/ |
|
|
|
|
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise |
|
|
|
|
${DRONE_TAG} |
|
|
|
|
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json |
|
|
|
|
- mkdir bin |
|
|
|
|
- mv /tmp/grabpl bin/ |
|
|
|
|
depends_on: |
|
|
|
|
- clone-enterprise |
|
|
|
|
environment: |
|
|
|
|
GITHUB_TOKEN: |
|
|
|
|
from_secret: github_token |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
name: verify-gen-jsonnet |
|
|
|
|
- commands: |
|
|
|
|
- make gen-go |
|
|
|
|
depends_on: |
|
|
|
|
- verify-gen-cue |
|
|
|
|
image: grafana/build-container:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
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:1.7.2 |
|
|
|
|
name: memcached-integration-tests |
|
|
|
|
trigger: |
|
|
|
|
event: |
|
|
|
|
- promote |
|
|
|
|
target: integration-tests |
|
|
|
|
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 |
|
|
|
@ -6634,6 +6614,6 @@ kind: secret |
|
|
|
|
name: enterprise2_security_prefix |
|
|
|
|
--- |
|
|
|
|
kind: signature |
|
|
|
|
hmac: 7ed023fb45c28415f26835221bd1e1e440c6f6796a5262da866f8ce9c4314542 |
|
|
|
|
hmac: 5854eba6447f784a354210984cb34a52f0d04a2df8387d2df1a24731e2838e9d |
|
|
|
|
|
|
|
|
|
... |
|
|
|
|