Skip to content

Commit a3dd973

Browse files
authored
Adding Presto to Check
Reference: CV2-3435.
1 parent a64a0f4 commit a3dd973

File tree

7 files changed

+49
-8
lines changed

7 files changed

+49
-8
lines changed

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
url = [email protected]:meedan/alegre.git
2929
branch = develop
3030
ignore = all
31+
[submodule "presto"]
32+
path = presto
33+
url = [email protected]:meedan/presto.git
34+
branch = master
35+
ignore = all
3136
[submodule "check-bots"]
3237
path = check-bots
3338
url = [email protected]:meedan/check-bots.git

.travis.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dist: bionic
1+
dist: jammy
22
git:
33
submodules: false
44
before_script:
@@ -8,18 +8,19 @@ before_script:
88
- sed -i 's/--abort-on-container-exit/-d/' bin/first-build.sh
99
- TAB=$'\t'
1010
# For each submodule, go to a branch with the same name as this branch
11-
- export FALLBACK_BRANCH=$([ "$TRAVIS_BRANCH" == "master" ] && echo "main" || echo "develop")
12-
- git submodule foreach 'bash -c "git checkout develop ; git checkout $FALLBACK_BRANCH ; git checkout $TRAVIS_BRANCH ; exit 0"'
11+
- export FALLBACK_BRANCH=$([ "$TRAVIS_BRANCH" == "master" ] && echo "main" && echo "master" || echo "develop")
12+
- git submodule foreach 'bash -c "git checkout master ; git checkout develop ; git checkout $FALLBACK_BRANCH ; git checkout $TRAVIS_BRANCH ; exit 0"'
1313
- git submodule foreach git rev-parse --abbrev-ref HEAD
1414
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
1515
script:
1616
- ./bin/first-build.sh
1717
- until curl --silent -I -f --fail http://localhost:3000 ; do printf .; sleep 1; done
1818
- sleep 120
19-
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3200)!= "200" )); then exit 1; fi; # Pender
20-
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3100)!= "200" )); then exit 1; fi; # Alegre
21-
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3333)!= "200" )); then exit 1; fi; # Check Web
22-
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000)!= "200" )); then exit 1; fi; # Check API
19+
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3200)!= "200" )); then exit 1; fi; # Pender
20+
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3100)!= "200" )); then exit 1; fi; # Alegre
21+
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:8000/ping)!= "200" )); then exit 1; fi; # Presto
22+
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3333)!= "200" )); then exit 1; fi; # Check Web
23+
- if (( $(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000)!= "200" )); then exit 1; fi; # Check API
2324
- docker ps --format '{{.Image}}' | sort >> docker_up_output.txt
2425
- diff docker_up_output.txt test/image_names.txt
2526
notifications:

bin/first-build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Go to the develop branch of each repository
4-
git submodule foreach bash -c 'git checkout develop'
4+
git submodule foreach bash -c 'git checkout develop || git checkout master'
55

66
# Copy the example files
77
find . -name '*.example' -not -path '*apollo*' | while read f; do cp "$f" "${f%%.example}"; done

docker-compose.yml

+27
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ services:
7373
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
7474
networks:
7575
- dev
76+
elasticmq:
77+
image: softwaremill/elasticmq
78+
hostname: presto-elasticmq
79+
ports:
80+
- "9324:9324"
81+
healthcheck:
82+
test: ["CMD", "wget", "-q", "-S", "-O", "-", "127.0.0.1:9324/?Action=ListQueues"]
83+
interval: 10s
84+
timeout: 5s
85+
retries: 10
86+
networks:
87+
- dev
7688
api:
7789
build: check-api
7890
mem_limit: 4g
@@ -167,6 +179,20 @@ services:
167179
ELASTICSEARCH_URL: http://elasticsearch:9200
168180
networks:
169181
- dev
182+
presto:
183+
build: presto
184+
platform: linux/amd64
185+
ports:
186+
- "8000:8000"
187+
volumes:
188+
- "./presto:/app"
189+
env_file:
190+
- presto/.env_file
191+
networks:
192+
- dev
193+
depends_on:
194+
elasticmq:
195+
condition: service_healthy
170196
alegre:
171197
build: alegre
172198
platform: linux/x86_64
@@ -178,6 +204,7 @@ services:
178204
- postgres
179205
- redis
180206
- elasticsearch
207+
- presto
181208
env_file:
182209
- alegre/.env_file
183210
networks:

docker-test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ services:
5252
BOILERPLATE_ENV: test
5353
ALEGRE_PORT: 3100
5454
REDIS_DATABASE: 3
55+
presto:
56+
environment:
57+
BOILERPLATE_ENV: test
58+
PRESTO_PORT: 8000
59+
REDIS_DATABASE: 3
5560
narcissus:
5661
environment:
5762
NODE_ENV: development

presto

Submodule presto added at 89703cc

test/image_names.txt

+2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ check_narcissus
88
check_pender
99
check_pender-background
1010
check_postgres
11+
check_presto
1112
check_queue_worker
1213
check_web
1314
docker.elastic.co/kibana/kibana:7.9.2
1415
minio/minio
1516
redis:5
17+
softwaremill/elasticmq

0 commit comments

Comments
 (0)