Skip to content

Commit 7a99270

Browse files
committed
Add boot test for sagittarius rails-web
1 parent 791f470 commit 7a99270

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.container:boot:
2+
extends:
3+
- .dind
4+
stage: container:boot
5+
image: ghcr.io/code0-tech/build-images/reticulum-builder:171.1-ruby-3.2.2
6+
7+
.container:boot:sagittarius:
8+
extends:
9+
- .container:boot
10+
needs:
11+
- container:sagittarius
12+
parallel:
13+
matrix:
14+
- VARIANT:
15+
- ce
16+
- ee
17+
variables:
18+
SAGITTARIUS_IMAGE: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${CI_PIPELINE_ID}-${VARIANT}
19+
CURL_IMAGE: curlimages/curl:8.5.0
20+
before_script:
21+
- docker network create boot
22+
- >
23+
docker run
24+
--detach
25+
--name postgres
26+
--network boot
27+
--network-alias postgres
28+
--env POSTGRES_USER=sagittarius
29+
--env POSTGRES_PASSWORD=sagittarius
30+
--env POSTGRES_DB=sagittarius_production
31+
postgres:16.1
32+
- docker pull $SAGITTARIUS_IMAGE
33+
- docker pull $CURL_IMAGE
34+
- >
35+
docker run
36+
--name sagittarius
37+
--network boot
38+
--network-alias sagittarius
39+
--volume $(pwd)/container/sagittarius/sagittarius.yml:/sagittarius/config/sagittarius.yml
40+
$SAGITTARIUS_IMAGE
41+
$SAGITTARIUS_CMD &
42+
43+
container:boot:sagittarius:rails-web:
44+
extends:
45+
- .container:boot:sagittarius
46+
variables:
47+
SAGITTARIUS_CMD: ""
48+
script:
49+
- >
50+
docker run
51+
--rm
52+
--network boot
53+
$CURL_IMAGE
54+
curl
55+
--fail
56+
-sv
57+
--retry 20
58+
--retry-delay 3
59+
--retry-connrefused
60+
http://sagittarius:3000/health/liveness
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rails:
2+
web:
3+
force_ssl: false
4+
db:
5+
host: postgres
6+
port: 5432

0 commit comments

Comments
 (0)