CI: Make build, test and integration tests steps run in parallel (#40794)
* Make build and test steps run in parallel * Make tests and builds run on different pipelines * Make test-backend depend on initialize * Rename * Create standalone integration tests pipeline (#41730) * Remove unused variables
This commit is contained in:
@@ -124,7 +124,7 @@ def initialize_step(edition, platform, ver_mode, is_downstream=False, install_de
|
||||
|
||||
return steps
|
||||
|
||||
def download_grabpl():
|
||||
def download_grabpl_step():
|
||||
return {
|
||||
'name': 'grabpl',
|
||||
'image': curl_image,
|
||||
@@ -312,7 +312,7 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False):
|
||||
'name': 'build-backend' + enterprise2_suffix(edition),
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'test-backend' + enterprise2_suffix(edition),
|
||||
'initialize',
|
||||
],
|
||||
'environment': env,
|
||||
'commands': cmds,
|
||||
@@ -345,7 +345,7 @@ def build_frontend_step(edition, ver_mode, is_downstream=False):
|
||||
'name': 'build-frontend',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'test-frontend',
|
||||
'initialize',
|
||||
],
|
||||
'commands': cmds,
|
||||
}
|
||||
@@ -375,7 +375,7 @@ def build_plugins_step(edition, sign=False):
|
||||
'name': 'build-plugins',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'lint-backend',
|
||||
'initialize',
|
||||
],
|
||||
'environment': env,
|
||||
'commands': [
|
||||
@@ -389,7 +389,7 @@ def test_backend_step(edition):
|
||||
'name': 'test-backend' + enterprise2_suffix(edition),
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'lint-backend',
|
||||
'initialize',
|
||||
],
|
||||
'commands': [
|
||||
'./bin/grabpl test-backend --edition {}'.format(edition),
|
||||
@@ -401,7 +401,7 @@ def test_backend_integration_step(edition):
|
||||
'name': 'test-backend-integration' + enterprise2_suffix(edition),
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'lint-backend',
|
||||
'initialize',
|
||||
],
|
||||
'commands': [
|
||||
'./bin/grabpl integration-tests --edition {}'.format(edition),
|
||||
@@ -688,7 +688,7 @@ def postgres_integration_tests_step():
|
||||
'name': 'postgres-integration-tests',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
'grabpl',
|
||||
],
|
||||
'environment': {
|
||||
'PGPASSWORD': 'grafanatest',
|
||||
@@ -712,7 +712,7 @@ def mysql_integration_tests_step():
|
||||
'name': 'mysql-integration-tests',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'initialize',
|
||||
'grabpl',
|
||||
],
|
||||
'environment': {
|
||||
'GRAFANA_TEST_DB': 'mysql',
|
||||
@@ -734,8 +734,7 @@ def redis_integration_tests_step():
|
||||
'name': 'redis-integration-tests',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'test-backend',
|
||||
'test-frontend',
|
||||
'grabpl',
|
||||
],
|
||||
'environment': {
|
||||
'REDIS_URL': 'redis://redis:6379/0',
|
||||
@@ -751,8 +750,7 @@ def memcached_integration_tests_step():
|
||||
'name': 'memcached-integration-tests',
|
||||
'image': build_image,
|
||||
'depends_on': [
|
||||
'test-backend',
|
||||
'test-frontend',
|
||||
'grabpl',
|
||||
],
|
||||
'environment': {
|
||||
'MEMCACHED_HOSTS': 'memcached:11211',
|
||||
@@ -939,7 +937,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
||||
else:
|
||||
committish = '$$env:DRONE_COMMIT'
|
||||
# For enterprise, we have to clone both OSS and enterprise and merge the latter into the former
|
||||
download_grabpl_cmds = [
|
||||
download_grabpl_step_cmds = [
|
||||
'$$ProgressPreference = "SilentlyContinue"',
|
||||
'Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v{}/windows/grabpl.exe -OutFile grabpl.exe'.format(grabpl_version),
|
||||
]
|
||||
@@ -957,7 +955,7 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
|
||||
'environment': {
|
||||
'GITHUB_TOKEN': from_secret(github_token),
|
||||
},
|
||||
'commands': download_grabpl_cmds + clone_cmds,
|
||||
'commands': download_grabpl_step_cmds + clone_cmds,
|
||||
})
|
||||
steps[1]['depends_on'] = [
|
||||
'clone',
|
||||
|
||||
Reference in New Issue
Block a user