Revert Bypass tests (#40018)

This commit is contained in:
Dimitris Sotirakis
2021-10-05 17:06:21 +02:00
committed by GitHub
parent 814f8abe19
commit c24d8f7431
2 changed files with 214 additions and 132 deletions
+142 -75
View File
@@ -73,7 +73,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -138,7 +138,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -191,7 +192,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -203,7 +210,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -227,9 +240,6 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
event:
- pull_request
@@ -321,7 +331,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -411,7 +421,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -481,7 +492,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -493,7 +510,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -550,9 +573,6 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
branch:
- master
@@ -560,7 +580,6 @@ trigger:
- push
---
version: 1809
kind: pipeline
type: docker
name: windows-master
@@ -654,9 +673,6 @@ steps:
depends_on:
- initialize
node:
type: no-parallel
trigger:
branch:
- master
@@ -774,7 +790,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -856,7 +872,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -906,7 +923,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -918,7 +941,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -991,15 +1020,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
ref:
- refs/tags/v*
---
version: 1809
kind: pipeline
type: docker
name: oss-windows-release
@@ -1144,7 +1169,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -1261,7 +1286,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -1301,7 +1327,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -1313,7 +1345,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -1387,7 +1425,8 @@ steps:
- name: end-to-end-tests-enterprise2
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3002 --tries 3
environment:
HOST: end-to-end-tests-server-enterprise2
depends_on:
@@ -1422,15 +1461,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
ref:
- refs/tags/v*
---
version: 1809
kind: pipeline
type: docker
name: enterprise-windows-release
@@ -1563,9 +1598,6 @@ steps:
depends_on:
- initialize
node:
type: no-parallel
trigger:
ref:
- refs/tags/v*
@@ -1683,7 +1715,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -1765,7 +1797,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -1809,7 +1842,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -1821,7 +1860,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -1889,15 +1934,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
event:
- custom
---
version: 1809
kind: pipeline
type: docker
name: oss-windows-test-release
@@ -2042,7 +2083,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -2159,7 +2200,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -2193,7 +2235,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -2205,7 +2253,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -2279,7 +2333,8 @@ steps:
- name: end-to-end-tests-enterprise2
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3002 --tries 3
environment:
HOST: end-to-end-tests-server-enterprise2
depends_on:
@@ -2314,15 +2369,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
event:
- custom
---
version: 1809
kind: pipeline
type: docker
name: enterprise-windows-test-release
@@ -2455,9 +2506,6 @@ steps:
depends_on:
- initialize
node:
type: no-parallel
trigger:
event:
- custom
@@ -2574,7 +2622,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -2653,7 +2701,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -2697,7 +2746,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -2709,7 +2764,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -2756,15 +2817,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
ref:
- refs/heads/v*
---
version: 1809
kind: pipeline
type: docker
name: oss-windows-release-branch
@@ -2904,7 +2961,7 @@ steps:
- name: test-frontend
image: grafana/build-container:1.4.1
commands:
- echo Skip test-frontend
- yarn run ci:test-frontend
environment:
TEST_MAX_WORKERS: 50%
depends_on:
@@ -3015,7 +3072,8 @@ steps:
- name: end-to-end-tests
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3001 --tries 3
environment:
HOST: end-to-end-tests-server
depends_on:
@@ -3059,7 +3117,13 @@ steps:
- name: postgres-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq postgresql-client
- ./bin/dockerize -wait tcp://postgres:5432 -timeout 120s
- psql -p 5432 -h postgres -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
- go clean -testcache
- ./bin/grabpl integration-tests --database postgres
environment:
GRAFANA_TEST_DB: postgres
PGPASSWORD: grafanatest
@@ -3071,7 +3135,13 @@ steps:
- name: mysql-integration-tests
image: grafana/build-container:1.4.1
commands:
- echo Skip postgres-integration-tests
- mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30
- mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list
- apt-get install -yq default-mysql-client
- ./bin/dockerize -wait tcp://mysql:3306 -timeout 120s
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql -P 3306 -u root -prootpass
- go clean -testcache
- ./bin/grabpl integration-tests --database mysql
environment:
GRAFANA_TEST_DB: mysql
MYSQL_HOST: mysql
@@ -3145,7 +3215,8 @@ steps:
- name: end-to-end-tests-enterprise2
image: grafana/ci-e2e:12.19.0-1
commands:
- echo Skip e2e-tests
- ./node_modules/.bin/cypress install
- ./bin/grabpl e2e-tests --port 3002 --tries 3
environment:
HOST: end-to-end-tests-server-enterprise2
depends_on:
@@ -3180,15 +3251,11 @@ services:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_USER: grafana
node:
type: no-parallel
trigger:
ref:
- refs/heads/v*
---
version: 1809
kind: pipeline
type: docker
name: enterprise-windows-release-branch
+72 -57
View File
@@ -11,7 +11,7 @@ test_release_ver = 'v7.3.0-test'
def pipeline(
name, edition, trigger, steps, ver_mode, services=[], platform='linux', depends_on=[],
is_downstream=False, install_deps=True,
):
):
if platform != 'windows':
platform_conf = {
'platform': {
@@ -43,7 +43,6 @@ def pipeline(
) + steps,
'depends_on': depends_on,
}
pipeline.update(platform_conf)
if edition in ('enterprise', 'enterprise2'):
# We have a custom clone step for enterprise
@@ -167,13 +166,13 @@ def init_steps(edition, platform, ver_mode, is_downstream=False, install_deps=Tr
'clone',
],
'commands': [
'mv bin/grabpl /tmp/',
'rmdir bin',
'mv grafana-enterprise /tmp/',
'/tmp/grabpl init-enterprise /tmp/grafana-enterprise{}'.format(source_commit),
'mkdir bin',
'mv /tmp/grabpl bin/'
] + common_cmds,
'mv bin/grabpl /tmp/',
'rmdir bin',
'mv grafana-enterprise /tmp/',
'/tmp/grabpl init-enterprise /tmp/grafana-enterprise{}'.format(source_commit),
'mkdir bin',
'mv /tmp/grabpl bin/'
] + common_cmds,
},
]
@@ -240,7 +239,7 @@ def benchmark_ldap_step():
'initialize',
],
'environment': {
'LDAP_HOSTNAME': 'ldap',
'LDAP_HOSTNAME': 'ldap',
},
'commands': [
'./bin/dockerize -wait tcp://ldap:389 -timeout 120s',
@@ -253,9 +252,9 @@ def ldap_service():
'name': 'ldap',
'image': 'osixia/openldap:1.4.0',
'environment': {
'LDAP_ADMIN_PASSWORD': 'grafana',
'LDAP_DOMAIN': 'grafana.org',
'SLAPD_ADDITIONAL_MODULES': 'memberof',
'LDAP_ADMIN_PASSWORD': 'grafana',
'LDAP_DOMAIN': 'grafana.org',
'SLAPD_ADDITIONAL_MODULES': 'memberof',
},
}
@@ -294,12 +293,12 @@ def publish_storybook_step(edition, ver_mode):
else:
channels = ['canary',]
commands.extend([
'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json',
'gcloud auth activate-service-account --key-file=/tmp/gcpkey.json',
] + [
'gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/{}'.format(c)
for c in channels
])
'printenv GCP_KEY | base64 -d > /tmp/gcpkey.json',
'gcloud auth activate-service-account --key-file=/tmp/gcpkey.json',
] + [
'gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/{}'.format(c)
for c in channels
])
return {
'name': 'publish-storybook',
@@ -322,14 +321,14 @@ def upload_cdn(edition):
'image': publish_image,
'depends_on': [
'package' + enterprise2_sfx(edition),
],
],
'environment': {
'GCP_GRAFANA_UPLOAD_KEY': {
'from_secret': 'gcp_key',
},
},
'commands': [
'./bin/grabpl upload-cdn --edition {} --bucket "grafana-static-assets"'.format(edition),
'./bin/grabpl upload-cdn --edition {} --bucket "grafana-static-assets"'.format(edition),
],
}
@@ -380,7 +379,7 @@ def build_backend_step(edition, ver_mode, variants=None, is_downstream=False):
'initialize',
'lint-backend' + enterprise2_sfx(edition),
'test-backend' + enterprise2_sfx(edition),
],
],
'environment': env,
'commands': cmds,
}
@@ -395,18 +394,18 @@ def build_frontend_step(edition, ver_mode, is_downstream=False):
if ver_mode == 'release':
cmds = [
'./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps ' + \
'--edition {} --no-pull-enterprise ${{DRONE_TAG}}'.format(edition),
]
'--edition {} --no-pull-enterprise ${{DRONE_TAG}}'.format(edition),
]
elif ver_mode == 'test-release':
cmds = [
'./bin/grabpl build-frontend --jobs 8 --github-token $${GITHUB_TOKEN} --no-install-deps ' + \
'--edition {} --no-pull-enterprise {}'.format(edition, test_release_ver),
'--edition {} --no-pull-enterprise {}'.format(edition, test_release_ver),
]
else:
cmds = [
'./bin/grabpl build-frontend --jobs 8 --no-install-deps --edition {} '.format(edition) + \
'--build-id {} --no-pull-enterprise'.format(build_no),
]
'--build-id {} --no-pull-enterprise'.format(build_no),
]
return {
'name': 'build-frontend',
@@ -462,7 +461,7 @@ def test_backend_step(edition):
'depends_on': [
'initialize',
'lint-backend' + enterprise2_sfx(edition),
],
],
'commands': [
# First make sure that there are no tests with FocusConvey
'[ $(grep FocusConvey -R pkg | wc -l) -eq "0" ] || exit 1',
@@ -484,7 +483,7 @@ def test_frontend_step():
'TEST_MAX_WORKERS': '50%',
},
'commands': [
'echo Skip test-frontend',
'yarn run ci:test-frontend',
],
}
@@ -564,7 +563,7 @@ def gen_version_step(ver_mode, include_enterprise2=False, is_downstream=False):
deps.extend([
'build-backend' + sfx,
'test-backend' + sfx,
])
])
if ver_mode == 'release':
args = '${DRONE_TAG}'
@@ -621,17 +620,17 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False):
if ver_mode == 'release':
cmds = [
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} ${{DRONE_TAG}}'.format(
sign_args
),
]
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} ${{DRONE_TAG}}'.format(
sign_args
),
]
elif ver_mode == 'test-release':
cmds = [
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} {}'.format(
sign_args, test_release_ver,
),
]
'--github-token $${{GITHUB_TOKEN}} --no-pull-enterprise{} {}'.format(
sign_args, test_release_ver,
),
]
else:
if not is_downstream:
build_no = '${DRONE_BUILD_NUMBER}'
@@ -639,8 +638,8 @@ def package_step(edition, ver_mode, variants=None, is_downstream=False):
build_no = '$${SOURCE_BUILD_NUMBER}'
cmds = [
'{}./bin/grabpl package --jobs 8 --edition {} '.format(test_args, edition) + \
'--build-id {} --no-pull-enterprise{}{}'.format(build_no, variants_str, sign_args),
]
'--build-id {} --no-pull-enterprise{}{}'.format(build_no, variants_str, sign_args),
]
return {
'name': 'package' + enterprise2_sfx(edition),
@@ -674,7 +673,7 @@ def e2e_tests_server_step(edition, port=3001):
'detach': True,
'depends_on': [
'package' + enterprise2_sfx(edition),
],
],
'environment': environment,
'commands': [
'./e2e/start-server',
@@ -690,14 +689,15 @@ def e2e_tests_step(edition, port=3001, tries=None):
'image': 'grafana/ci-e2e:12.19.0-1',
'depends_on': [
'end-to-end-tests-server' + enterprise2_sfx(edition),
],
],
'environment': {
'HOST': 'end-to-end-tests-server' + enterprise2_sfx(edition),
},
'commands': [
# Have to re-install Cypress since it insists on searching for its binary beneath /root/.cache,
# even though the Yarn cache directory is beneath /usr/local/share somewhere
'echo Skip e2e-tests',
'./node_modules/.bin/cypress install',
cmd,
],
}
@@ -774,8 +774,16 @@ def postgres_integration_tests_step():
'POSTGRES_HOST': 'postgres',
},
'commands': [
'echo Skip postgres-integration-tests',
],
'mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30',
'mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list',
'apt-get install -yq postgresql-client',
'./bin/dockerize -wait tcp://postgres:5432 -timeout 120s',
'psql -p 5432 -h postgres -U grafanatest -d grafanatest -f ' +
'devenv/docker/blocks/postgres_tests/setup.sql',
# Make sure that we don't use cached results for another database
'go clean -testcache',
'./bin/grabpl integration-tests --database postgres',
],
}
def mysql_integration_tests_step():
@@ -791,7 +799,14 @@ def mysql_integration_tests_step():
'MYSQL_HOST': 'mysql',
},
'commands': [
'echo Skip postgres-integration-tests',
'mv /etc/apt/sources.list.d/nodesource.list /etc/apt/sources.list.d/nodesource.list.disabled; apt-get update; apt-get -y upgrade; apt-get install -y ca-certificates libgnutls30',
'mv /etc/apt/sources.list.d/nodesource.list.disabled /etc/apt/sources.list.d/nodesource.list',
'apt-get install -yq default-mysql-client',
'./bin/dockerize -wait tcp://mysql:3306 -timeout 120s',
'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
'go clean -testcache',
'./bin/grabpl integration-tests --database mysql',
],
}
@@ -848,7 +863,7 @@ def upload_packages_step(edition, ver_mode, is_downstream=False):
if ver_mode == 'test-release':
cmd = './bin/grabpl upload-packages --edition {} '.format(edition) + \
'--packages-bucket grafana-downloads-test'
'--packages-bucket grafana-downloads-test'
else:
cmd = './bin/grabpl upload-packages --edition {}{}'.format(edition, packages_bucket)
@@ -860,7 +875,7 @@ def upload_packages_step(edition, ver_mode, is_downstream=False):
'end-to-end-tests' + enterprise2_sfx(edition),
'mysql-integration-tests',
'postgres-integration-tests',
],
],
'environment': {
'GCP_GRAFANA_UPLOAD_KEY': {
'from_secret': 'gcp_key',
@@ -872,10 +887,10 @@ def upload_packages_step(edition, ver_mode, is_downstream=False):
def publish_packages_step(edition, ver_mode, is_downstream=False):
if ver_mode == 'test-release':
cmd = './bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json '.format(edition) + \
'--deb-db-bucket grafana-testing-aptly-db --deb-repo-bucket grafana-testing-repo --packages-bucket ' + \
'grafana-downloads-test --rpm-repo-bucket grafana-testing-repo --simulate-release {}'.format(
test_release_ver,
)
'--deb-db-bucket grafana-testing-aptly-db --deb-repo-bucket grafana-testing-repo --packages-bucket ' + \
'grafana-downloads-test --rpm-repo-bucket grafana-testing-repo --simulate-release {}'.format(
test_release_ver,
)
elif ver_mode == 'release':
cmd = './bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json ${{DRONE_TAG}}'.format(
edition,
@@ -886,7 +901,7 @@ def publish_packages_step(edition, ver_mode, is_downstream=False):
else:
build_no = '$${SOURCE_BUILD_NUMBER}'
cmd = './bin/grabpl publish-packages --edition {} --gcp-key /tmp/gcpkey.json --build-id {}'.format(
edition, build_no,
edition, build_no,
)
else:
fail('Unexpected version mode {}'.format(ver_mode))
@@ -1042,14 +1057,14 @@ def get_windows_steps(edition, ver_mode, is_downstream=False):
return steps
def integration_test_services():
return [
return [
{
'name': 'postgres',
'image': 'postgres:12.3-alpine',
'environment': {
'POSTGRES_USER': 'grafanatest',
'POSTGRES_PASSWORD': 'grafanatest',
'POSTGRES_DB': 'grafanatest',
'POSTGRES_USER': 'grafanatest',
'POSTGRES_PASSWORD': 'grafanatest',
'POSTGRES_DB': 'grafanatest',
},
},
{