mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
This commit is contained in:
parent
56693672ad
commit
c782f3031a
26
.drone.yml
26
.drone.yml
@ -1289,7 +1289,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database postgres
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
GRAFANA_TEST_DB: postgres
|
||||
PGPASSWORD: grafanatest
|
||||
@ -1305,7 +1305,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database mysql
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
GRAFANA_TEST_DB: mysql
|
||||
MYSQL_HOST: mysql
|
||||
@ -1472,7 +1472,7 @@ steps:
|
||||
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -1481,7 +1481,7 @@ steps:
|
||||
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
MEMCACHED_HOSTS: memcached:11211
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -2223,7 +2223,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database postgres
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- grabpl
|
||||
environment:
|
||||
GRAFANA_TEST_DB: postgres
|
||||
PGPASSWORD: grafanatest
|
||||
@ -2239,7 +2239,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database mysql
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- grabpl
|
||||
environment:
|
||||
GRAFANA_TEST_DB: mysql
|
||||
MYSQL_HOST: mysql
|
||||
@ -2398,7 +2398,7 @@ steps:
|
||||
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- grabpl
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -2407,7 +2407,7 @@ steps:
|
||||
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- grabpl
|
||||
environment:
|
||||
MEMCACHED_HOSTS: memcached:11211
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -3126,7 +3126,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database postgres
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
GRAFANA_TEST_DB: postgres
|
||||
PGPASSWORD: grafanatest
|
||||
@ -3142,7 +3142,7 @@ steps:
|
||||
- go clean -testcache
|
||||
- ./bin/grabpl integration-tests --database mysql
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
GRAFANA_TEST_DB: mysql
|
||||
MYSQL_HOST: mysql
|
||||
@ -3306,7 +3306,7 @@ steps:
|
||||
- dockerize -wait tcp://redis:6379/0 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
REDIS_URL: redis://redis:6379/0
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -3315,7 +3315,7 @@ steps:
|
||||
- dockerize -wait tcp://memcached:11211 -timeout 120s
|
||||
- ./bin/grabpl integration-tests
|
||||
depends_on:
|
||||
- clone-enterprise
|
||||
- initialize
|
||||
environment:
|
||||
MEMCACHED_HOSTS: memcached:11211
|
||||
image: grafana/build-container:1.4.5
|
||||
@ -3556,6 +3556,6 @@ kind: secret
|
||||
name: drone_token
|
||||
---
|
||||
kind: signature
|
||||
hmac: 79b8fbf21117214728689d489c53562a55c8536fa1feb9983bc1be2528dd9087
|
||||
hmac: 68182383c80b7e49367441fa69d6c7fb21527649213196a0ee44ddbe9a1d7e41
|
||||
|
||||
...
|
||||
|
@ -65,8 +65,8 @@ def get_steps(edition, is_downstream=False):
|
||||
test_backend_step(edition=edition),
|
||||
test_backend_integration_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
postgres_integration_tests_step(edition=edition),
|
||||
mysql_integration_tests_step(edition=edition),
|
||||
postgres_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
mysql_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||
build_frontend_step(edition=edition, ver_mode=ver_mode, is_downstream=is_downstream),
|
||||
build_plugins_step(edition=edition, sign=True),
|
||||
@ -99,7 +99,7 @@ def get_steps(edition, is_downstream=False):
|
||||
])
|
||||
|
||||
if include_enterprise2:
|
||||
steps.extend([redis_integration_tests_step(edition=edition2), memcached_integration_tests_step(edition=edition2)])
|
||||
steps.extend([redis_integration_tests_step(edition=edition2, ver_mode=ver_mode), memcached_integration_tests_step(edition=edition2, ver_mode=ver_mode)])
|
||||
|
||||
steps.extend([
|
||||
release_canary_npm_packages_step(edition),
|
||||
|
@ -66,8 +66,8 @@ def pr_pipelines(edition):
|
||||
ensure_cuetsified_step(),
|
||||
]
|
||||
integration_test_steps = [
|
||||
postgres_integration_tests_step(edition=edition),
|
||||
mysql_integration_tests_step(edition=edition),
|
||||
postgres_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
mysql_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
]
|
||||
|
||||
if include_enterprise2:
|
||||
@ -98,8 +98,8 @@ def pr_pipelines(edition):
|
||||
|
||||
if include_enterprise2:
|
||||
integration_test_steps.extend([
|
||||
redis_integration_tests_step(edition=edition2),
|
||||
memcached_integration_tests_step(edition=edition),
|
||||
redis_integration_tests_step(edition=edition2, ver_mode=ver_mode),
|
||||
memcached_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
])
|
||||
build_steps.extend([
|
||||
package_step(edition=edition2, ver_mode=ver_mode, include_enterprise2=include_enterprise2, variants=['linux-x64']),
|
||||
|
@ -77,11 +77,15 @@ def release_npm_packages_step(edition, ver_mode):
|
||||
}
|
||||
|
||||
def get_steps(edition, ver_mode):
|
||||
build_steps = []
|
||||
package_steps = []
|
||||
windows_package_steps = []
|
||||
publish_steps = []
|
||||
should_publish = ver_mode in ('release', 'test-release',)
|
||||
should_upload = should_publish or ver_mode in ('release-branch',)
|
||||
include_enterprise2 = edition == 'enterprise'
|
||||
|
||||
steps = [
|
||||
build_steps = [
|
||||
codespell_step(),
|
||||
shellcheck_step(),
|
||||
lint_backend_step(edition=edition),
|
||||
@ -89,8 +93,8 @@ def get_steps(edition, ver_mode):
|
||||
test_backend_step(edition=edition),
|
||||
test_backend_integration_step(edition=edition),
|
||||
test_frontend_step(),
|
||||
postgres_integration_tests_step(edition=edition),
|
||||
mysql_integration_tests_step(edition=edition),
|
||||
postgres_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
mysql_integration_tests_step(edition=edition, ver_mode=ver_mode),
|
||||
build_backend_step(edition=edition, ver_mode=ver_mode),
|
||||
build_frontend_step(edition=edition, ver_mode=ver_mode),
|
||||
build_plugins_step(edition=edition, sign=True),
|
||||
@ -100,7 +104,7 @@ def get_steps(edition, ver_mode):
|
||||
|
||||
edition2 = 'enterprise2'
|
||||
if include_enterprise2:
|
||||
steps.extend([
|
||||
build_steps.extend([
|
||||
lint_backend_step(edition=edition2),
|
||||
test_backend_step(edition=edition2),
|
||||
test_backend_integration_step(edition=edition2),
|
||||
@ -108,7 +112,7 @@ def get_steps(edition, ver_mode):
|
||||
])
|
||||
|
||||
# Insert remaining steps
|
||||
steps.extend([
|
||||
build_steps.extend([
|
||||
package_step(edition=edition, ver_mode=ver_mode, include_enterprise2=include_enterprise2),
|
||||
e2e_tests_server_step(edition=edition),
|
||||
e2e_tests_step(edition=edition, tries=3),
|
||||
@ -119,26 +123,26 @@ def get_steps(edition, ver_mode):
|
||||
|
||||
build_storybook = build_storybook_step(edition=edition, ver_mode=ver_mode)
|
||||
if build_storybook:
|
||||
steps.append(build_storybook)
|
||||
build_steps.append(build_storybook)
|
||||
|
||||
if include_enterprise2:
|
||||
steps.extend([redis_integration_tests_step(edition=edition2), memcached_integration_tests_step(edition=edition2)])
|
||||
build_steps.extend([redis_integration_tests_step(edition=edition2, ver_mode=ver_mode), memcached_integration_tests_step(edition=edition2, ver_mode=ver_mode)])
|
||||
|
||||
if should_upload:
|
||||
steps.append(upload_cdn_step(edition=edition))
|
||||
steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode))
|
||||
publish_steps.append(upload_cdn_step(edition=edition))
|
||||
publish_steps.append(upload_packages_step(edition=edition, ver_mode=ver_mode))
|
||||
if should_publish:
|
||||
publish_step = publish_storybook_step(edition=edition, ver_mode=ver_mode)
|
||||
release_npm_step = release_npm_packages_step(edition=edition, ver_mode=ver_mode)
|
||||
if publish_step:
|
||||
steps.append(publish_step)
|
||||
publish_steps.append(publish_step)
|
||||
if release_npm_step:
|
||||
steps.append(release_npm_step)
|
||||
windows_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
|
||||
publish_steps.append(release_npm_step)
|
||||
windows_package_steps = get_windows_steps(edition=edition, ver_mode=ver_mode)
|
||||
|
||||
if include_enterprise2:
|
||||
edition2 = 'enterprise2'
|
||||
steps.extend([
|
||||
publish_steps.extend([
|
||||
package_step(edition=edition2, ver_mode=ver_mode, include_enterprise2=include_enterprise2, variants=['linux-x64']),
|
||||
e2e_tests_server_step(edition=edition2, port=3002),
|
||||
e2e_tests_step(edition=edition2, port=3002, tries=3),
|
||||
@ -147,22 +151,23 @@ def get_steps(edition, ver_mode):
|
||||
if should_upload:
|
||||
step = upload_packages_step(edition=edition2, ver_mode=ver_mode)
|
||||
if step:
|
||||
steps.append(step)
|
||||
publish_steps.append(step)
|
||||
|
||||
return steps, windows_steps
|
||||
return build_steps, package_steps, windows_package_steps, publish_steps
|
||||
|
||||
def get_oss_pipelines(trigger, ver_mode):
|
||||
edition = 'oss'
|
||||
services = integration_test_services(edition=edition)
|
||||
steps, windows_steps = get_steps(edition=edition, ver_mode=ver_mode)
|
||||
build_steps, package_steps, windows_package_steps, publish_steps = get_steps(edition=edition, ver_mode=ver_mode)
|
||||
return [
|
||||
pipeline(
|
||||
name='oss-build-{}'.format(ver_mode), edition=edition, trigger=trigger, services=services,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) + steps,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) +
|
||||
build_steps + package_steps + publish_steps,
|
||||
),
|
||||
pipeline(
|
||||
name='oss-windows-{}'.format(ver_mode), edition=edition, trigger=trigger,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='windows', ver_mode=ver_mode) + windows_steps,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='windows', ver_mode=ver_mode) + windows_package_steps,
|
||||
platform='windows', depends_on=['oss-build-{}'.format(ver_mode)],
|
||||
),
|
||||
]
|
||||
@ -170,15 +175,16 @@ def get_oss_pipelines(trigger, ver_mode):
|
||||
def get_enterprise_pipelines(trigger, ver_mode):
|
||||
edition = 'enterprise'
|
||||
services = integration_test_services(edition=edition)
|
||||
steps, windows_steps = get_steps(edition=edition, ver_mode=ver_mode)
|
||||
build_steps, package_steps, windows_package_steps, publish_steps = get_steps(edition=edition, ver_mode=ver_mode)
|
||||
return [
|
||||
pipeline(
|
||||
name='enterprise-build-{}'.format(ver_mode), edition=edition, trigger=trigger, services=services,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) + steps,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='linux', ver_mode=ver_mode) +
|
||||
build_steps + package_steps + publish_steps,
|
||||
),
|
||||
pipeline(
|
||||
name='enterprise-windows-{}'.format(ver_mode), edition=edition, trigger=trigger,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='windows', ver_mode=ver_mode) + windows_steps,
|
||||
steps=[download_grabpl_step()] + initialize_step(edition, platform='windows', ver_mode=ver_mode) + windows_package_steps,
|
||||
platform='windows', depends_on=['enterprise-build-{}'.format(ver_mode)],
|
||||
),
|
||||
]
|
||||
|
@ -730,10 +730,10 @@ def build_docker_images_step(edition, ver_mode, archs=None, ubuntu=False, publis
|
||||
}
|
||||
|
||||
|
||||
def postgres_integration_tests_step(edition):
|
||||
def postgres_integration_tests_step(edition, ver_mode):
|
||||
deps = []
|
||||
if edition in ('enterprise', 'enterprise2'):
|
||||
deps.extend(['clone-enterprise'])
|
||||
if edition in ('enterprise', 'enterprise2') and ver_mode in ('release-branch', 'release'):
|
||||
deps.extend(['initialize'])
|
||||
else:
|
||||
deps.extend(['grabpl'])
|
||||
return {
|
||||
@ -758,10 +758,10 @@ def postgres_integration_tests_step(edition):
|
||||
}
|
||||
|
||||
|
||||
def mysql_integration_tests_step(edition):
|
||||
def mysql_integration_tests_step(edition, ver_mode):
|
||||
deps = []
|
||||
if edition in ('enterprise', 'enterprise2'):
|
||||
deps.extend(['clone-enterprise'])
|
||||
if edition in ('enterprise', 'enterprise2') and ver_mode in ('release-branch', 'release'):
|
||||
deps.extend(['initialize'])
|
||||
else:
|
||||
deps.extend(['grabpl'])
|
||||
return {
|
||||
@ -784,10 +784,10 @@ def mysql_integration_tests_step(edition):
|
||||
}
|
||||
|
||||
|
||||
def redis_integration_tests_step(edition):
|
||||
def redis_integration_tests_step(edition, ver_mode):
|
||||
deps = []
|
||||
if edition in ('enterprise', 'enterprise2'):
|
||||
deps.extend(['clone-enterprise'])
|
||||
if edition in ('enterprise', 'enterprise2') and ver_mode in ('release-branch', 'release'):
|
||||
deps.extend(['initialize'])
|
||||
else:
|
||||
deps.extend(['grabpl'])
|
||||
return {
|
||||
@ -804,10 +804,10 @@ def redis_integration_tests_step(edition):
|
||||
}
|
||||
|
||||
|
||||
def memcached_integration_tests_step(edition):
|
||||
def memcached_integration_tests_step(edition, ver_mode):
|
||||
deps = []
|
||||
if edition in ('enterprise', 'enterprise2'):
|
||||
deps.extend(['clone-enterprise'])
|
||||
if edition in ('enterprise', 'enterprise2') and ver_mode in ('release-branch', 'release'):
|
||||
deps.extend(['initialize'])
|
||||
else:
|
||||
deps.extend(['grabpl'])
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user