@ -160,224 +160,6 @@ image_pull_secrets:
- gcr
- gar
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.21.3
name : identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
depends_on : [ ]
image : node:22.11.0-alpine
name : yarn-install
- commands:
- apk add --update git bash
- yarn betterer:ci
depends_on:
- yarn-install
image : node:22.11.0-alpine
name : betterer-frontend
- commands:
- echo $(/usr/bin/github-app-external-token) > /github-app/token
environment:
GITHUB_APP_ID:
from_secret : github-app-app-id
GITHUB_APP_INSTALLATION_ID:
from_secret : github-app-installation-id
GITHUB_APP_PRIVATE_KEY:
from_secret : github-app-private-key
failure : ignore
image : us-docker.pkg.dev/grafanalabs-global/docker-deployment-tools-prod/github-app-secret-writer:2024-11-05-v11688112090.1-83920c59
name : github-app-generate-token
volumes:
- name : github-app
path : /github-app
- commands:
- apk add --update curl jq bash
- GITHUB_TOKEN=$(cat /github-app/token)
- is_fork=$(curl --retry 5 "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://x-access-token:$${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
depends_on:
- github-app-generate-token
failure : ignore
image : alpine/git:2.40.1
name : clone-enterprise
volumes:
- name : github-app
path : /github-app
- commands:
- yarn run ci:test-frontend
depends_on:
- yarn-install
environment:
TEST_MAX_WORKERS : 50 %
image : node:22.11.0-alpine
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
- name : github-app
temp : {}
---
clone:
retries : 3
depends_on : [ ]
environment:
EDITION : oss
image_pull_secrets:
- gcr
- gar
kind : pipeline
name : pr-lint-frontend
node:
type : no -parallel
platform:
arch : amd64
os : linux
services : [ ]
steps:
- commands:
- echo $(/usr/bin/github-app-external-token) > /github-app/token
environment:
GITHUB_APP_ID:
from_secret : github-app-app-id
GITHUB_APP_INSTALLATION_ID:
from_secret : github-app-installation-id
GITHUB_APP_PRIVATE_KEY:
from_secret : github-app-private-key
failure : ignore
image : us-docker.pkg.dev/grafanalabs-global/docker-deployment-tools-prod/github-app-secret-writer:2024-11-05-v11688112090.1-83920c59
name : github-app-generate-token
volumes:
- name : github-app
path : /github-app
- commands:
- apk add --update curl jq bash
- GITHUB_TOKEN=$(cat /github-app/token)
- is_fork=$(curl --retry 5 "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://x-access-token:$${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
depends_on:
- github-app-generate-token
failure : ignore
image : alpine/git:2.40.1
name : clone-enterprise
volumes:
- name : github-app
path : /github-app
- commands:
- echo $DRONE_RUNNER_NAME
image : alpine:3.21.3
name : identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
depends_on : [ ]
image : node:22.11.0-alpine
name : yarn-install
- commands:
- yarn run prettier:check
- yarn run lint
- yarn run typecheck
depends_on:
- yarn-install
environment:
TEST_MAX_WORKERS : 50 %
image : node:22.11.0-alpine
name : lint-frontend
- commands:
- |-
make i18n-extract || (echo "
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
- "\n file_diff=$(git diff --dirstat public/locales)\n if
[ -n \"$file_diff\" ]; then\n echo $file_diff\n echo
\"\nTranslation extraction has not been committed. Please run 'make i18n-extract',
commit the changes and push again.\"\n exit 1\n fi\n
\ "
depends_on:
- yarn-install
image : node:22-bookworm
name : verify-i18n
- commands:
- yarn generate-apis
- "\n file_diff=$(git diff ':!conf')\n if [ -n \"$file_diff\"
] ; then\n echo $file_diff\n echo \"\nAPI client
generation has not been committed. Please run 'yarn generate-apis', commit the
changes and push again.\"\n exit 1\n fi\n "
depends_on:
- yarn-install
image : node:22-bookworm
name : verify-api-clients
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
- name : github-app
temp : {}
---
clone:
retries : 3
depends_on : [ ]
environment:
EDITION : oss
image_pull_secrets:
- gcr
- gar
kind : pipeline
name : pr-test-backend
node:
type : no -parallel
@ -1698,140 +1480,6 @@ image_pull_secrets:
- gcr
- gar
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.21.3
name : identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
depends_on : [ ]
image : node:22.11.0-alpine
name : yarn-install
- commands:
- apk add --update git bash
- yarn betterer:ci
depends_on:
- yarn-install
image : node:22.11.0-alpine
name : betterer-frontend
- commands:
- yarn run ci:test-frontend
depends_on:
- yarn-install
environment:
TEST_MAX_WORKERS : 50 %
image : node:22.11.0-alpine
name : test-frontend
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 : [ ]
environment:
EDITION : oss
image_pull_secrets:
- gcr
- gar
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.21.3
name : identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
depends_on : [ ]
image : node:22.11.0-alpine
name : yarn-install
- commands:
- yarn run prettier:check
- yarn run lint
- yarn run typecheck
depends_on:
- yarn-install
environment:
TEST_MAX_WORKERS : 50 %
image : node:22.11.0-alpine
name : lint-frontend
- commands:
- |-
make i18n-extract || (echo "
Extraction failed. Make sure that you have no dynamic translation phrases, such as 't(\`preferences.theme.\$${themeID}\`, themeName)' and that no translation key is used twice. Search the output for '[warning]' to find the offending file." && false)
- "\n file_diff=$(git diff --dirstat public/locales)\n if
[ -n \"$file_diff\" ]; then\n echo $file_diff\n echo
\"\nTranslation extraction has not been committed. Please run 'make i18n-extract',
commit the changes and push again.\"\n exit 1\n fi\n
\ "
depends_on:
- yarn-install
image : node:22-bookworm
name : verify-i18n
- commands:
- yarn generate-apis
- "\n file_diff=$(git diff ':!conf')\n if [ -n \"$file_diff\"
] ; then\n echo $file_diff\n echo \"\nAPI client
generation has not been committed. Please run 'yarn generate-apis', commit the
changes and push again.\"\n exit 1\n fi\n "
depends_on:
- yarn-install
image : node:22-bookworm
name : verify-api-clients
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 : [ ]
environment:
EDITION : oss
image_pull_secrets:
- gcr
- gar
kind : pipeline
name : main-test-backend
node:
type : no -parallel
@ -2802,7 +2450,6 @@ volumes:
clone:
retries : 3
depends_on:
- main-test-frontend
- main-test-backend
- main-build-e2e-publish
- main-integration-tests
@ -3974,7 +3621,6 @@ clone:
retries : 3
depends_on:
- main-test-backend
- main-test-frontend
image_pull_secrets:
- gcr
- gar
@ -5564,6 +5210,6 @@ kind: secret
name : gcr_credentials
---
kind : signature
hmac : f55fddb4c6faf30b232ae778ec6c022c9f3d32955879e8a764c715642712c5ea
hmac : efb7a251f741df9b3497b3c09683604b25752f1f52488aff7175fff4802e8ce3
...