Skip to content

Commit 6cda08f

Browse files
committed
Split pg ci job into sid/pg14 and focal/pg12
1 parent 14a5e06 commit 6cda08f

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.drone.jsonnet

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,20 @@ local debian_pipeline(name,
6363
services: services,
6464
};
6565

66+
local debian_pg_pipeline(name, image, pg_tag='bullseye') = debian_pipeline(
67+
name,
68+
image,
69+
deps=default_deps + ['python3-psycopg2', 'postgresql-client'],
70+
services=[
71+
{ name: 'pg', image: 'postgres:bullseye', environment: { POSTGRES_USER: 'ci', POSTGRES_PASSWORD: 'ci' } },
72+
],
73+
before_pytest=[
74+
'for i in $(seq 0 30); do if pg_isready -d ci -h pg -U ci -t 1; then break; fi; if [ "$i" = 30 ]; then echo "Timeout waiting for postgresql" >&2; exit 1; fi; sleep 1; done',
75+
],
76+
pytest_opts='--pgsql "postgresql://ci:ci@pg/ci"'
77+
);
78+
79+
6680
[
6781
{
6882
name: 'Lint checks',
@@ -97,18 +111,8 @@ local debian_pipeline(name,
97111
debian_pipeline('Ubuntu latest (amd64)', docker_base + 'ubuntu-rolling'),
98112
debian_pipeline('Ubuntu LTS (amd64)', docker_base + 'ubuntu-lts'),
99113

100-
debian_pipeline(
101-
'PostgreSQL/bullseye',
102-
docker_base + 'debian-bullseye',
103-
deps=default_deps + ['python3-psycopg2', 'postgresql-client'],
104-
services=[
105-
{ name: 'pg', image: 'postgres:bullseye', environment: { POSTGRES_USER: 'ci', POSTGRES_PASSWORD: 'ci' } },
106-
],
107-
before_pytest=[
108-
'for i in $(seq 0 30); do if pg_isready -d ci -h pg -U ci -t 1; then break; fi; if [ "$i" = 30 ]; then echo "Timeout waiting for postgresql" >&2; exit 1; fi; sleep 1; done',
109-
],
110-
pytest_opts='--pgsql "postgresql://ci:ci@pg/ci"'
111-
),
114+
debian_pg_pipeline('PostgreSQL 14/sid', docker_base + 'debian-sid', pg_tag='14-bullseye'),
115+
debian_pg_pipeline('PostgreSQL 12/focal', docker_base + 'ubuntu-focal', pg_tag='12-bullseye'),
112116

113117
// ARM builds (ARM64 and armhf)
114118
debian_pipeline('Debian sid (ARM64)', docker_base + 'debian-sid', arch='arm64'),

0 commit comments

Comments
 (0)