CI: Backport CI/Release related code to v9.3.x (#62752)

* Batch-move everything

* go mod tidy

* make drone

* Remove genversions

* Bump alpine image

* Revert back pkg/build/docker/build.go

* Make sure correct enterprise branch is checked out

* Add enterprise2 version

* Remove extensions

* Bump build container

* backport node 18 test fix

(cherry picked from commit 4ff03fdbfb)

* Update scripts/drone

* Add more commands

* Fix starlark link

* Copy .drone.star

* Add drone target branch for custom events

---------
This commit is contained in:
Dimitris Sotirakis
2023-02-03 11:43:48 +02:00
committed by GitHub
parent d9b5c5f4c6
commit 03b1cf763d
85 changed files with 8622 additions and 2695 deletions
+46 -41
View File
@@ -1,61 +1,66 @@
"""
This module has functions for Drone services to be used in pipelines.
"""
def integration_test_services_volumes():
return [
{ 'name': 'postgres', 'temp': { 'medium': 'memory' } },
{ 'name': 'mysql', 'temp': { 'medium': 'memory' }
}]
{"name": "postgres", "temp": {"medium": "memory"}},
{"name": "mysql", "temp": {"medium": "memory"}},
]
def integration_test_services(edition):
services = [
{
'name': 'postgres',
'image': 'postgres:12.3-alpine',
'environment': {
'POSTGRES_USER': 'grafanatest',
'POSTGRES_PASSWORD': 'grafanatest',
'POSTGRES_DB': 'grafanatest',
'PGDATA': '/var/lib/postgresql/data/pgdata',
"name": "postgres",
"image": "postgres:12.3-alpine",
"environment": {
"POSTGRES_USER": "grafanatest",
"POSTGRES_PASSWORD": "grafanatest",
"POSTGRES_DB": "grafanatest",
"PGDATA": "/var/lib/postgresql/data/pgdata",
},
'volumes': [{
'name': 'postgres',
'path': '/var/lib/postgresql/data/pgdata'
}],
"volumes": [
{"name": "postgres", "path": "/var/lib/postgresql/data/pgdata"},
],
},
{
'name': 'mysql',
'image': 'mysql:5.7.39',
'environment': {
'MYSQL_ROOT_PASSWORD': 'rootpass',
'MYSQL_DATABASE': 'grafana_tests',
'MYSQL_USER': 'grafana',
'MYSQL_PASSWORD': 'password',
"name": "mysql",
"image": "mysql:5.7.39",
"environment": {
"MYSQL_ROOT_PASSWORD": "rootpass",
"MYSQL_DATABASE": "grafana_tests",
"MYSQL_USER": "grafana",
"MYSQL_PASSWORD": "password",
},
'volumes': [{
'name': 'mysql',
'path': '/var/lib/mysql'
}]
"volumes": [{"name": "mysql", "path": "/var/lib/mysql"}],
},
]
if edition in ('enterprise', 'enterprise2'):
services.extend([{
'name': 'redis',
'image': 'redis:6.2.1-alpine',
'environment': {},
}, {
'name': 'memcached',
'image': 'memcached:1.6.9-alpine',
'environment': {},
}])
if edition in ("enterprise", "enterprise2"):
services.extend(
[
{
"name": "redis",
"image": "redis:6.2.1-alpine",
"environment": {},
},
{
"name": "memcached",
"image": "memcached:1.6.9-alpine",
"environment": {},
},
],
)
return services
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',
"name": "ldap",
"image": "osixia/openldap:1.4.0",
"environment": {
"LDAP_ADMIN_PASSWORD": "grafana",
"LDAP_DOMAIN": "grafana.org",
"SLAPD_ADDITIONAL_MODULES": "memberof",
},
}