FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sequin/.github/workflows/docker-smoke.sh at main · sequinstream/sequin · GitHub
sequinstream
/
sequin
Public
Notifications
You must be signed in to change notification settings
Fork
151
Star
2.2k
Code
Issues
58
Pull requests
14
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
sequin
/
.github
/
workflows
/
docker-smoke.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
53 lines (40 loc) · 1.27 KB
Breadcrumbs
sequin
/
.github
/
workflows
/
docker-smoke.sh
Copy path
File metadata and controls
executable file
·
53 lines (40 loc) · 1.27 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!
/usr/bin/env bash
set
-ex
IMAGE_PREFIX=
"
sequin/sequin
"
export
IMAGE_PREFIX
export
IMAGE_VERSION
#
Pull the AMD64 image
docker pull
"
$IMAGE_PREFIX
:
$IMAGE_VERSION
"
#
Directory for our test configuration
TEST_CONFIG=
"
test-config
"
REAL_CONFIG=
"
docker
"
REAL_COMPOSE_YML=
"
docker-compose.yaml
"
TEST_COMPOSE_YML=
"
docker-compose.test.yml
"
mkdir -p
"
$TEST_CONFIG
"
#
Patch docker-compose file with correct image version
cat
<
"
$REAL_CONFIG
/
$REAL_COMPOSE_YML
"
\
|
yq
'
.services.sequin.image = strenv(IMAGE_PREFIX) + ":" + strenv(IMAGE_VERSION)
'
\
|
cat
>
"
$TEST_CONFIG
/
$TEST_COMPOSE_YML
"
cp -r
"
$REAL_CONFIG
"
/
*
"
$TEST_CONFIG
"
cd
"
$TEST_CONFIG
"
#
Start the services
docker compose -f
"
$TEST_COMPOSE_YML
"
up -d
#
Wait for the application to start (30 seconds max)
echo
"
Waiting for application to start...
"
for
i
in
{1..30}
;
do
healthy=
$(
curl -s http://localhost:7376/health
|
jq -r .ok
)
if
[[
$healthy
==
"
true
"
]]
;
then
echo
"
Application started successfully!
"
break
fi
if
[
$i
-eq
30 ]
;
then
echo
"
Application failed to start within 30 seconds
"
docker compose -f
"
$TEST_COMPOSE_YML
"
logs
exit
1
fi
sleep 1
done
echo
"
App is healthy - smoke test passed successfully!
"
#
Cleanup
docker compose -f
"
$TEST_COMPOSE_YML
"
down
rm -rf
"
$TEST_COMPOSE_YML
"
test-config
Back
|
FazBrowse Home
|
New Git URL