mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add dependencies (#56666)
This commit is contained in:
parent
53baecd71f
commit
811f6054c8
63
.drone.yml
63
.drone.yml
@ -2893,6 +2893,31 @@ platform:
|
||||
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:1.6.3
|
||||
name: clone-enterprise
|
||||
- commands:
|
||||
- mv bin/grabpl /tmp/
|
||||
- rmdir bin
|
||||
- mv grafana-enterprise /tmp/
|
||||
- /tmp/grabpl init-enterprise --github-token $${GITHUB_TOKEN} /tmp/grafana-enterprise
|
||||
${DRONE_TAG}
|
||||
- mv /tmp/grafana-enterprise/deployment_tools_config.json deployment_tools_config.json
|
||||
- mkdir bin
|
||||
- mv /tmp/grabpl bin/
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
environment:
|
||||
GITHUB_TOKEN:
|
||||
from_secret: github_token
|
||||
image: grafana/build-container:1.6.3
|
||||
name: init-enterprise
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.15.6
|
||||
@ -2912,6 +2937,7 @@ steps:
|
||||
- commands:
|
||||
- yarn betterer ci
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
- yarn-install
|
||||
failure: ignore
|
||||
image: grafana/build-container:1.6.3
|
||||
@ -2998,7 +3024,8 @@ steps:
|
||||
- '# The following command will fail if running code generators produces any diff
|
||||
in output.'
|
||||
- CODEGEN_VERIFY=1 make gen-cue
|
||||
depends_on: []
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
image: grafana/build-container:1.6.3
|
||||
name: verify-gen-cue
|
||||
- commands:
|
||||
@ -3081,7 +3108,8 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
depends_on: []
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.19.2
|
||||
@ -4885,6 +4913,28 @@ platform:
|
||||
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:1.6.3
|
||||
name: clone-enterprise
|
||||
- commands:
|
||||
- mv bin/grabpl /tmp/
|
||||
- rmdir bin
|
||||
- mv grafana-enterprise /tmp/
|
||||
- /tmp/grabpl init-enterprise /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: {}
|
||||
image: grafana/build-container:1.6.3
|
||||
name: init-enterprise
|
||||
- commands:
|
||||
- echo $DRONE_RUNNER_NAME
|
||||
image: alpine:3.15.6
|
||||
@ -4904,6 +4954,7 @@ steps:
|
||||
- commands:
|
||||
- yarn betterer ci
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
- yarn-install
|
||||
failure: ignore
|
||||
image: grafana/build-container:1.6.3
|
||||
@ -4981,7 +5032,8 @@ steps:
|
||||
- '# The following command will fail if running code generators produces any diff
|
||||
in output.'
|
||||
- CODEGEN_VERIFY=1 make gen-cue
|
||||
depends_on: []
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
image: grafana/build-container:1.6.3
|
||||
name: verify-gen-cue
|
||||
- commands:
|
||||
@ -5055,7 +5107,8 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
|
||||
depends_on: []
|
||||
depends_on:
|
||||
- init-enterprise
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
image: golang:1.19.2
|
||||
@ -5548,6 +5601,6 @@ kind: secret
|
||||
name: packages_secret_access_key
|
||||
---
|
||||
kind: signature
|
||||
hmac: 82dedf98f127a4d16c71b668d9a2df17502c109cc6ff0ab01e770547250135e7
|
||||
hmac: 5c4b0f30f0ddd8e8ad797c10c4aecb29eb04f842450b2ad3feffa91ffb2e8a2b
|
||||
|
||||
...
|
||||
|
@ -23,7 +23,7 @@ def test_backend(trigger, ver_mode, edition="oss"):
|
||||
init_steps.extend([
|
||||
identify_runner_step(),
|
||||
compile_build_cmd(edition),
|
||||
verify_gen_cue_step(edition="oss"),
|
||||
verify_gen_cue_step(edition),
|
||||
wire_install_step(),
|
||||
])
|
||||
test_steps = [
|
||||
|
@ -1,6 +1,8 @@
|
||||
load(
|
||||
'scripts/drone/steps/lib.star',
|
||||
'identify_runner_step',
|
||||
'clone_enterprise_step',
|
||||
'init_enterprise_step',
|
||||
'download_grabpl_step',
|
||||
'yarn_install_step',
|
||||
'betterer_frontend_step',
|
||||
@ -14,13 +16,16 @@ load(
|
||||
|
||||
def test_frontend(trigger, ver_mode, edition="oss"):
|
||||
environment = {'EDITION': edition}
|
||||
init_steps = [
|
||||
init_steps = []
|
||||
if edition != 'oss':
|
||||
init_steps.extend([clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode),])
|
||||
init_steps.extend([
|
||||
identify_runner_step(),
|
||||
download_grabpl_step(),
|
||||
yarn_install_step(),
|
||||
]
|
||||
])
|
||||
test_steps = [
|
||||
betterer_frontend_step(),
|
||||
betterer_frontend_step(edition),
|
||||
test_frontend_step(),
|
||||
]
|
||||
pipeline_name = '{}-test-frontend'.format(ver_mode)
|
||||
|
@ -514,13 +514,15 @@ def test_backend_integration_step(edition):
|
||||
],
|
||||
}
|
||||
|
||||
def betterer_frontend_step():
|
||||
def betterer_frontend_step(edition="oss"):
|
||||
deps = []
|
||||
if edition == "enterprise":
|
||||
deps.extend(['init-enterprise'])
|
||||
deps.extend(['yarn-install'])
|
||||
return {
|
||||
'name': 'betterer-frontend',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'yarn-install',
|
||||
],
|
||||
'depends_on': deps,
|
||||
'commands': [
|
||||
'yarn betterer ci',
|
||||
],
|
||||
@ -529,16 +531,18 @@ def betterer_frontend_step():
|
||||
|
||||
|
||||
|
||||
def test_frontend_step():
|
||||
def test_frontend_step(edition="oss"):
|
||||
deps = []
|
||||
if edition == "enterprise":
|
||||
deps.extend(['init-enterprise'])
|
||||
deps.extend(['yarn-install'])
|
||||
return {
|
||||
'name': 'test-frontend',
|
||||
'image': build_image,
|
||||
'environment': {
|
||||
'TEST_MAX_WORKERS': '50%',
|
||||
},
|
||||
'depends_on': [
|
||||
'yarn-install',
|
||||
],
|
||||
'depends_on': deps,
|
||||
'commands': [
|
||||
'yarn run ci:test-frontend',
|
||||
],
|
||||
@ -1253,7 +1257,7 @@ def end_to_end_tests_deps(edition):
|
||||
|
||||
def compile_build_cmd(edition='oss'):
|
||||
dependencies = []
|
||||
if edition == 'enterprise':
|
||||
if edition in ('enterprise', 'enterprise2'):
|
||||
dependencies = ['init-enterprise',]
|
||||
return {
|
||||
'name': 'compile-build-cmd',
|
||||
|
Loading…
Reference in New Issue
Block a user