From 833903bd0011ed3cd4821074f2e5ee6cca6a6052 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Wed, 30 Sep 2020 19:28:28 +0200 Subject: [PATCH] Drone: Sync with enterprise (#27939) Signed-off-by: Arve Knudsen --- scripts/lib.star | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/scripts/lib.star b/scripts/lib.star index 5bac0641c18..be52b81df21 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -52,6 +52,9 @@ def pr_pipelines(edition): mysql_integration_tests_step(), ] windows_steps = get_windows_steps(edition=edition, version_mode=version_mode) + if edition == 'enterprise': + steps.append(benchmark_ldap_step()) + services.append(ldap_service()) trigger = { 'event': ['pull_request',], } @@ -130,6 +133,11 @@ def master_pipelines(edition): 'branch': 'master', } steps, windows_steps, publish_steps = master_steps(edition=edition) + + if edition == 'enterprise': + steps.append(benchmark_ldap_step()) + services.append(ldap_service()) + pipelines = [ pipeline( name='build-master', edition=edition, trigger=trigger, services=services, steps=steps, @@ -362,6 +370,33 @@ def lint_backend_step(edition): ], } +def benchmark_ldap_step(): + return { + 'name': 'benchmark-ldap', + 'image': build_image, + 'depends_on': [ + 'initialize', + ], + 'environment': { + 'LDAP_HOSTNAME': 'ldap', + }, + 'commands': [ + './bin/dockerize -wait tcp://ldap:389 -timeout 120s', + 'go test -benchmem -run=^$ ./pkg/extensions/ldapsync -bench "^(Benchmark50Users)$"', + ], + } + +def ldap_service(): + return { + 'name': 'ldap', + 'image': 'osixia/openldap:1.4.0', + 'environment': { + 'LDAP_ADMIN_PASSWORD': 'grafana', + 'LDAP_DOMAIN': 'grafana.org', + 'SLAPD_ADDITIONAL_MODULES': 'memberof', + }, + } + def build_storybook_step(edition): return { 'name': 'build-storybook',