Skip to content

Commit 59fb437

Browse files
committed
Combine streamed JSON
1 parent 87f8c17 commit 59fb437

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

scripts/check_deployment.rb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,9 @@
33
output = `curl --verbose --silent http://localhost:3000/ 2>&1`
44

55
if $?.success? && output.include?('Browse the catalogue')
6-
docker_ps = `docker compose ps -a --format json > out.json`
6+
docker_ps = `docker compose ps -a --format json | jq -s`
77
if $?.success?
8-
begin
9-
j = JSON.parse(File.read('out.json'))
10-
rescue => e
11-
puts "THE JSON:\n\n\n\n#{docker_ps}\n\n\n\n"
12-
raise e
13-
end
8+
j = JSON.parse(docker_ps)
149
unless j.any? { |c| c['ExitCode'] == 1 }
1510
exit 0
1611
end

0 commit comments

Comments
 (0)