Skip to content

Commit 638cd03

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

2 files changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
services:
11+
- postgres:16.1
12+
- !reference [.dind, services]
13+
needs:
14+
- container:sagittarius
15+
parallel:
16+
matrix:
17+
- VARIANT:
18+
- ce
19+
- ee
20+
variables:
21+
POSTGRES_DB: sagittarius_production
22+
POSTGRES_USER: sagittarius
23+
POSTGRES_PASSWORD: sagittarius
24+
SAGITTARIUS_IMAGE: ghcr.io/code0-tech/reticulum/ci-builds/sagittarius:${CI_PIPELINE_ID}-${VARIANT}
25+
CURL_IMAGE: curlimages/curl:8.5.0
26+
before_script:
27+
- docker network create boot
28+
- docker pull $SAGITTARIUS_IMAGE
29+
- docker pull $CURL_IMAGE
30+
- >
31+
docker run
32+
--name sagittarius
33+
--network boot
34+
--network-alias sagittarius
35+
-v $(pwd)/container/sagittarius/sagittarius.yml:/sagittarius/config/sagittarius.yml
36+
$SAGITTARIUS_IMAGE
37+
$SAGITTARIUS_CMD &
38+
39+
container:boot:sagittarius:rails-web:
40+
extends:
41+
- .container:boot:sagittarius
42+
variables:
43+
SAGITTARIUS_CMD: ""
44+
script:
45+
- >
46+
docker run
47+
--rm
48+
--network boot
49+
$CURL_IMAGE
50+
curl
51+
--fail
52+
-sv
53+
--retry 20
54+
--retry-delay 3
55+
--retry-connrefused
56+
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)