Remove integration tags for enterprise (#50974)

* Remove integration tags for enterprise

* Adjust integration tests and backend tests for the current enterprise setup

* Remove entrerprise2 integration step and use go command for enterprise2 backend step

* CI: Tidy up `release-enterprise-*` pipeline dependencies (#51031)

* Tidy up enterprise deps

* Fixes according to reviewer's comments

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
pull/51251/head
idafurjes 4 years ago committed by GitHub
parent cef81a6478
commit ef23a76310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 98
      .drone.yml
  2. 6
      scripts/drone/pipelines/main.star
  3. 6
      scripts/drone/pipelines/pr.star
  4. 12
      scripts/drone/pipelines/release.star
  5. 70
      scripts/drone/steps/lib.star
  6. BIN
      scripts/go/bin/revive

@ -100,6 +100,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -205,6 +206,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -460,6 +462,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -788,6 +791,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -882,6 +886,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -1303,6 +1308,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -1567,6 +1573,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -1864,6 +1871,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -1996,6 +2004,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -2575,13 +2584,13 @@ steps:
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: lint-frontend name: lint-frontend
- commands: - commands:
- ./bin/grabpl test-backend --edition enterprise - go test -short -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: test-backend name: test-backend
- commands: - commands:
- ./bin/grabpl integration-tests --edition enterprise - go test -run Integration -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -2603,17 +2612,11 @@ steps:
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: lint-backend-enterprise2 name: lint-backend-enterprise2
- commands: - commands:
- ./bin/grabpl test-backend --edition enterprise2 - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: test-backend-enterprise2 name: test-backend-enterprise2
- commands:
- ./bin/grabpl integration-tests --edition enterprise2
depends_on:
- wire-install
image: grafana/build-container:1.5.7
name: test-backend-integration-enterprise2
trigger: trigger:
event: event:
exclude: exclude:
@ -2704,15 +2707,32 @@ steps:
from_secret: github_token from_secret: github_token
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: init-enterprise 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.5.7
name: verify-gen-cue
- commands:
- make gen-go
depends_on:
- verify-gen-cue
image: grafana/build-container:1.5.7
name: wire-install
- commands: - commands:
- apt-get update - apt-get update
- apt-get install -yq postgresql-client - apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s - dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql - psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache - go clean -testcache
- ./bin/grabpl integration-tests --database postgres - go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
-timeout=30m {}'
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
GRAFANA_TEST_DB: postgres GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest PGPASSWORD: grafanatest
@ -2726,9 +2746,10 @@ steps:
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root - cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
-prootpass -prootpass
- go clean -testcache - go clean -testcache
- ./bin/grabpl integration-tests --database mysql - go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
-timeout=30m {}'
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
GRAFANA_TEST_DB: mysql GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql MYSQL_HOST: mysql
@ -2738,7 +2759,7 @@ steps:
- dockerize -wait tcp://redis:6379/0 -timeout 120s - dockerize -wait tcp://redis:6379/0 -timeout 120s
- ./bin/grabpl integration-tests - ./bin/grabpl integration-tests
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
REDIS_URL: redis://redis:6379/0 REDIS_URL: redis://redis:6379/0
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -2747,7 +2768,7 @@ steps:
- dockerize -wait tcp://memcached:11211 -timeout 120s - dockerize -wait tcp://memcached:11211 -timeout 120s
- ./bin/grabpl integration-tests - ./bin/grabpl integration-tests
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
MEMCACHED_HOSTS: memcached:11211 MEMCACHED_HOSTS: memcached:11211
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -3395,6 +3416,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -3662,6 +3684,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -3788,6 +3811,7 @@ steps:
- '# The following command will fail if running code generators produces any diff - '# The following command will fail if running code generators produces any diff
in output.' in output.'
- CODEGEN_VERIFY=1 make gen-cue - CODEGEN_VERIFY=1 make gen-cue
depends_on: []
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: verify-gen-cue name: verify-gen-cue
- commands: - commands:
@ -4345,13 +4369,13 @@ steps:
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: lint-frontend name: lint-frontend
- commands: - commands:
- ./bin/grabpl test-backend --edition enterprise - go test -short -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: test-backend name: test-backend
- commands: - commands:
- ./bin/grabpl integration-tests --edition enterprise - go test -run Integration -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -4373,17 +4397,11 @@ steps:
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: lint-backend-enterprise2 name: lint-backend-enterprise2
- commands: - commands:
- ./bin/grabpl test-backend --edition enterprise2 - go test -tags=pro -covermode=atomic -timeout=30m ./pkg/...
depends_on: depends_on:
- wire-install - wire-install
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: test-backend-enterprise2 name: test-backend-enterprise2
- commands:
- ./bin/grabpl integration-tests --edition enterprise2
depends_on:
- wire-install
image: grafana/build-container:1.5.7
name: test-backend-integration-enterprise2
trigger: trigger:
ref: ref:
- refs/heads/v[0-9]* - refs/heads/v[0-9]*
@ -4465,15 +4483,32 @@ steps:
environment: {} environment: {}
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
name: init-enterprise 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.5.7
name: verify-gen-cue
- commands:
- make gen-go
depends_on:
- verify-gen-cue
image: grafana/build-container:1.5.7
name: wire-install
- commands: - commands:
- apt-get update - apt-get update
- apt-get install -yq postgresql-client - apt-get install -yq postgresql-client
- dockerize -wait tcp://postgres:5432 -timeout 120s - dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql - psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache - go clean -testcache
- ./bin/grabpl integration-tests --database postgres - go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
-timeout=30m {}'
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
GRAFANA_TEST_DB: postgres GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest PGPASSWORD: grafanatest
@ -4487,9 +4522,10 @@ steps:
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root - cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root
-prootpass -prootpass
- go clean -testcache - go clean -testcache
- ./bin/grabpl integration-tests --database mysql - go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic
-timeout=30m {}'
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
GRAFANA_TEST_DB: mysql GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql MYSQL_HOST: mysql
@ -4499,7 +4535,7 @@ steps:
- dockerize -wait tcp://redis:6379/0 -timeout 120s - dockerize -wait tcp://redis:6379/0 -timeout 120s
- ./bin/grabpl integration-tests - ./bin/grabpl integration-tests
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
REDIS_URL: redis://redis:6379/0 REDIS_URL: redis://redis:6379/0
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -4508,7 +4544,7 @@ steps:
- dockerize -wait tcp://memcached:11211 -timeout 120s - dockerize -wait tcp://memcached:11211 -timeout 120s
- ./bin/grabpl integration-tests - ./bin/grabpl integration-tests
depends_on: depends_on:
- init-enterprise - wire-install
environment: environment:
MEMCACHED_HOSTS: memcached:11211 MEMCACHED_HOSTS: memcached:11211
image: grafana/build-container:1.5.7 image: grafana/build-container:1.5.7
@ -4747,6 +4783,6 @@ kind: secret
name: gcp_upload_artifacts_key name: gcp_upload_artifacts_key
--- ---
kind: signature kind: signature
hmac: 32e54be4bd96844f07ea81b7ac46b37aa10f755074526353afb3420323e0f2f4 hmac: c9b6fd34c919d871a153c3d82bfe8d62f126f1c672bd14636147cdeafe827c10
... ...

@ -93,7 +93,7 @@ def main_test_backend():
identify_runner_step(), identify_runner_step(),
download_grabpl_step(), download_grabpl_step(),
gen_version_step(ver_mode), gen_version_step(ver_mode),
verify_gen_cue_step(), verify_gen_cue_step(edition="oss"),
wire_install_step(), wire_install_step(),
] ]
test_steps = [ test_steps = [
@ -114,7 +114,7 @@ def get_steps(edition):
identify_runner_step(), identify_runner_step(),
download_grabpl_step(), download_grabpl_step(),
gen_version_step(ver_mode), gen_version_step(ver_mode),
verify_gen_cue_step(), verify_gen_cue_step(edition="oss"),
wire_install_step(), wire_install_step(),
yarn_install_step(), yarn_install_step(),
] ]
@ -220,7 +220,7 @@ def main_pipelines(edition):
volumes=volumes, volumes=volumes,
), pipeline( ), pipeline(
name='main-integration-tests', edition=edition, trigger=trigger, services=services, name='main-integration-tests', edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(), wire_install_step(), ] + integration_test_steps, steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition="oss"), wire_install_step(), ] + integration_test_steps,
volumes=volumes, volumes=volumes,
), pipeline( ), pipeline(
name='main-windows', edition=edition, trigger=dict(trigger, repo=['grafana/grafana']), name='main-windows', edition=edition, trigger=dict(trigger, repo=['grafana/grafana']),

@ -91,7 +91,7 @@ def pr_test_backend():
identify_runner_step(), identify_runner_step(),
download_grabpl_step(), download_grabpl_step(),
gen_version_step(ver_mode), gen_version_step(ver_mode),
verify_gen_cue_step(), verify_gen_cue_step(edition="oss"),
wire_install_step(), wire_install_step(),
] ]
test_steps = [ test_steps = [
@ -115,7 +115,7 @@ def pr_pipelines(edition):
identify_runner_step(), identify_runner_step(),
download_grabpl_step(), download_grabpl_step(),
gen_version_step(ver_mode), gen_version_step(ver_mode),
verify_gen_cue_step(), verify_gen_cue_step(edition="oss"),
wire_install_step(), wire_install_step(),
yarn_install_step(), yarn_install_step(),
] ]
@ -153,7 +153,7 @@ def pr_pipelines(edition):
name='pr-build-e2e', edition=edition, trigger=trigger, services=[], steps=init_steps + build_steps, name='pr-build-e2e', edition=edition, trigger=trigger, services=[], steps=init_steps + build_steps,
), pipeline( ), pipeline(
name='pr-integration-tests', edition=edition, trigger=trigger, services=services, name='pr-integration-tests', edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(), wire_install_step(), ] + integration_test_steps, steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition="oss"), wire_install_step(), ] + integration_test_steps,
volumes=volumes, volumes=volumes,
), docs_pipelines(edition, ver_mode, trigger_docs()) ), docs_pipelines(edition, ver_mode, trigger_docs())
] ]

@ -158,7 +158,7 @@ def get_steps(edition, ver_mode):
identify_runner_step(), identify_runner_step(),
download_grabpl_step(), download_grabpl_step(),
gen_version_step(ver_mode), gen_version_step(ver_mode),
verify_gen_cue_step(), verify_gen_cue_step(edition),
wire_install_step(), wire_install_step(),
yarn_install_step(), yarn_install_step(),
] ]
@ -192,7 +192,6 @@ def get_steps(edition, ver_mode):
test_steps.extend([ test_steps.extend([
lint_backend_step(edition=edition2), lint_backend_step(edition=edition2),
test_backend_step(edition=edition2), test_backend_step(edition=edition2),
test_backend_integration_step(edition=edition2),
]) ])
build_steps.extend([ build_steps.extend([
build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-amd64']), build_backend_step(edition=edition2, ver_mode=ver_mode, variants=['linux-amd64']),
@ -272,7 +271,7 @@ def get_oss_pipelines(trigger, ver_mode):
), ),
pipeline( pipeline(
name='{}-oss-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services, name='{}-oss-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(), wire_install_step(), ] + integration_test_steps, steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition), wire_install_step(), ] + integration_test_steps,
volumes=volumes, volumes=volumes,
) )
]) ])
@ -304,13 +303,10 @@ def get_enterprise_pipelines(trigger, ver_mode):
clone_enterprise_step(ver_mode), clone_enterprise_step(ver_mode),
init_enterprise_step(ver_mode) init_enterprise_step(ver_mode)
] ]
for step in [wire_install_step(), yarn_install_step(), gen_version_step(ver_mode), verify_gen_cue_step()]: for step in [wire_install_step(), yarn_install_step(), gen_version_step(ver_mode), verify_gen_cue_step(edition)]:
step.update(deps_on_clone_enterprise_step) step.update(deps_on_clone_enterprise_step)
init_steps.extend([step]) init_steps.extend([step])
for step in integration_test_steps:
step.update(deps_on_clone_enterprise_step)
windows_pipeline = pipeline( windows_pipeline = pipeline(
name='{}-enterprise-windows'.format(ver_mode), edition=edition, trigger=trigger, name='{}-enterprise-windows'.format(ver_mode), edition=edition, trigger=trigger,
steps=[identify_runner_step('windows')] + windows_package_steps, steps=[identify_runner_step('windows')] + windows_package_steps,
@ -334,7 +330,7 @@ def get_enterprise_pipelines(trigger, ver_mode):
), ),
pipeline( pipeline(
name='{}-enterprise-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services, name='{}-enterprise-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode),] + integration_test_steps + [redis_integration_tests_step(), memcached_integration_tests_step()], steps=[download_grabpl_step(), identify_runner_step(), clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode), verify_gen_cue_step(edition), wire_install_step()] + integration_test_steps + [redis_integration_tests_step(), memcached_integration_tests_step()],
volumes=volumes, volumes=volumes,
), ),
]) ])

@ -502,7 +502,7 @@ def build_plugins_step(edition, sign=False):
def test_backend_step(edition): def test_backend_step(edition):
if edition == 'oss': if edition == 'enterprise2':
return { return {
'name': 'test-backend' + enterprise2_suffix(edition), 'name': 'test-backend' + enterprise2_suffix(edition),
'image': build_image, 'image': build_image,
@ -510,7 +510,7 @@ def test_backend_step(edition):
'wire-install', 'wire-install',
], ],
'commands': [ 'commands': [
'go test -short -covermode=atomic -timeout=30m ./pkg/...', 'go test -tags=pro -covermode=atomic -timeout=30m ./pkg/...',
], ],
} }
else: else:
@ -521,33 +521,23 @@ def test_backend_step(edition):
'wire-install', 'wire-install',
], ],
'commands': [ 'commands': [
'./bin/grabpl test-backend --edition {}'.format(edition), 'go test -short -covermode=atomic -timeout=30m ./pkg/...',
], ],
} }
def test_backend_integration_step(edition): def test_backend_integration_step(edition):
if edition == 'oss': return {
return { 'name': 'test-backend-integration',
'name': 'test-backend-integration', 'image': build_image,
'image': build_image, 'depends_on': [
'depends_on': [ 'wire-install',
'wire-install', ],
], 'commands': [
'commands': [ 'go test -run Integration -covermode=atomic -timeout=30m ./pkg/...',
'go test -run Integration -covermode=atomic -timeout=30m ./pkg/...', ],
], }
}
else:
return {
'name': 'test-backend-integration' + enterprise2_suffix(edition),
'image': build_image,
'depends_on': [
'wire-install',
],
'commands': [
'./bin/grabpl integration-tests --edition {}'.format(edition),
],
}
@ -869,7 +859,6 @@ def publish_images_step(edition, ver_mode, mode, docker_repo, trigger=None):
def postgres_integration_tests_step(edition, ver_mode): def postgres_integration_tests_step(edition, ver_mode):
deps = []
cmds = [ cmds = [
'apt-get update', 'apt-get update',
'apt-get install -yq postgresql-client', 'apt-get install -yq postgresql-client',
@ -878,17 +867,12 @@ def postgres_integration_tests_step(edition, ver_mode):
'devenv/docker/blocks/postgres_tests/setup.sql', 'devenv/docker/blocks/postgres_tests/setup.sql',
# Make sure that we don't use cached results for another database # Make sure that we don't use cached results for another database
'go clean -testcache', 'go clean -testcache',
"go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic -timeout=30m {}'",
] ]
if edition == 'oss':
deps.extend(['wire-install'])
cmds.extend(["go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic -timeout=30m {}'"])
else:
deps.extend(['grabpl'])
cmds.extend(['./bin/grabpl integration-tests --database postgres'])
return { return {
'name': 'postgres-integration-tests', 'name': 'postgres-integration-tests',
'image': build_image, 'image': build_image,
'depends_on': deps, 'depends_on': ['wire-install'],
'environment': { 'environment': {
'PGPASSWORD': 'grafanatest', 'PGPASSWORD': 'grafanatest',
'GRAFANA_TEST_DB': 'postgres', 'GRAFANA_TEST_DB': 'postgres',
@ -899,7 +883,6 @@ def postgres_integration_tests_step(edition, ver_mode):
def mysql_integration_tests_step(edition, ver_mode): def mysql_integration_tests_step(edition, ver_mode):
deps = []
cmds = [ cmds = [
'apt-get update', 'apt-get update',
'apt-get install -yq default-mysql-client', 'apt-get install -yq default-mysql-client',
@ -907,17 +890,12 @@ def mysql_integration_tests_step(edition, ver_mode):
'cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass', 'cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass',
# Make sure that we don't use cached results for another database # Make sure that we don't use cached results for another database
'go clean -testcache', 'go clean -testcache',
"go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic -timeout=30m {}'",
] ]
if edition == 'oss':
deps.extend(['wire-install'])
cmds.extend(["go list './pkg/...' | xargs -I {} sh -c 'go test -run Integration -covermode=atomic -timeout=30m {}'"])
else:
deps.extend(['grabpl'])
cmds.extend(['./bin/grabpl integration-tests --database mysql'])
return { return {
'name': 'mysql-integration-tests', 'name': 'mysql-integration-tests',
'image': build_image, 'image': build_image,
'depends_on': deps, 'depends_on': ['wire-install'],
'environment': { 'environment': {
'GRAFANA_TEST_DB': 'mysql', 'GRAFANA_TEST_DB': 'mysql',
'MYSQL_HOST': 'mysql', 'MYSQL_HOST': 'mysql',
@ -930,7 +908,7 @@ def redis_integration_tests_step():
return { return {
'name': 'redis-integration-tests', 'name': 'redis-integration-tests',
'image': build_image, 'image': build_image,
'depends_on': ['init-enterprise'], 'depends_on': ['wire-install'],
'environment': { 'environment': {
'REDIS_URL': 'redis://redis:6379/0', 'REDIS_URL': 'redis://redis:6379/0',
}, },
@ -945,7 +923,7 @@ def memcached_integration_tests_step():
return { return {
'name': 'memcached-integration-tests', 'name': 'memcached-integration-tests',
'image': build_image, 'image': build_image,
'depends_on': ['init-enterprise'], 'depends_on': ['wire-install'],
'environment': { 'environment': {
'MEMCACHED_HOSTS': 'memcached:11211', 'MEMCACHED_HOSTS': 'memcached:11211',
}, },
@ -1170,10 +1148,14 @@ def get_windows_steps(edition, ver_mode):
return steps return steps
def verify_gen_cue_step(): def verify_gen_cue_step(edition):
deps = []
if edition == "enterprise":
deps.extend(['init-enterprise'])
return { return {
'name': 'verify-gen-cue', 'name': 'verify-gen-cue',
'image': build_image, 'image': build_image,
'depends_on': deps,
'commands': [ 'commands': [
'# It is required that code generated from Thema/CUE be committed and in sync with its inputs.', '# 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.', '# The following command will fail if running code generators produces any diff in output.',

Binary file not shown.
Loading…
Cancel
Save