Skip to content

Commit 4067353

Browse files
authored
Merge pull request #2086 from apache/jbilleter/buildgrid
ci: Update BuildGrid setup to use PostgreSQL
2 parents d00fe5c + e5fc2f5 commit 4067353

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

.github/compose/ci.buildgrid.yml

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
#
44
# Spins-up a unnamed and unauthenticated grid:
55
# - Controller + CAS + AC at http://localhost:50051
6-
# - Ref. + CAS at: http://localhost:50052
76
#
87
# BuildStream configuration snippet:
98
#
10-
# artifacts:
11-
# url: http://localhost:50052
12-
# push: true
139
# remote-execution:
1410
# execution-service:
1511
# url: http://localhost:50051
@@ -25,6 +21,26 @@
2521
version: "3.2"
2622

2723
services:
24+
database:
25+
image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildgrid-postgres:nightly
26+
environment:
27+
POSTGRES_USER: bgd
28+
POSTGRES_PASSWORD: insecure
29+
POSTGRES_DB: bgd
30+
volumes:
31+
- type: volume
32+
source: db
33+
target: /var/lib/postgresql
34+
networks:
35+
- grid
36+
ports:
37+
- "5432:5432"
38+
healthcheck:
39+
test: ["CMD", "pg_isready", "-U", "bgd"]
40+
interval: 1s
41+
timeout: 5s
42+
retries: 10
43+
2844
controller:
2945
image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildgrid:nightly
3046
command: [
@@ -34,6 +50,9 @@ services:
3450
- 50051:50051
3551
networks:
3652
- grid
53+
depends_on:
54+
database:
55+
condition: service_healthy
3756

3857
bot:
3958
image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildbox:nightly
@@ -49,19 +68,10 @@ services:
4968
networks:
5069
- grid
5170

52-
storage:
53-
image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildgrid:nightly
54-
command: [
55-
"bgd", "server", "start", "-v",
56-
"/etc/buildgrid/artifacts.yml"]
57-
ports:
58-
- 50052:50052
59-
networks:
60-
- grid
61-
6271
networks:
6372
grid:
6473
driver: bridge
6574

6675
volumes:
6776
cache:
77+
db:

.github/compose/ci.docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ services:
5858
command: tox -vvvvv -- --color=yes --remote-execution
5959
environment:
6060
TOXENV: ${CI_TOXENV_MAIN}
61-
ARTIFACT_CACHE_SERVICE: http://localhost:50052
6261
REMOTE_EXECUTION_SERVICE: http://localhost:50051
63-
SOURCE_CACHE_SERVICE: http://localhost:50052
6462

6563
# We need to use host networking mode in order to be able to
6664
# properly resolve services exposed by adjacent containers.

0 commit comments

Comments
 (0)