Skip to content

Commit 60df501

Browse files
analyse elastic search status from host
1 parent ac594ad commit 60df501

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/indexing.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
run: |
8686
constat=`docker-compose ps 2>&1`
8787
echo -e "Container Status Complete:\n$constat"
88-
elasticsearchport=`echo "$constat" | grep -i elasticsearch | grep -ioE ":[0-9]+\->" | grep -ioE "[0-9]+"`
88+
elasticsearchport=`echo "$constat" | grep -i elasticsearch | grep -ioE ":[0-9]+\->" | grep -ioE "[0-9]+" | sed -n 1p`
8989
constat=`echo "$constat" | sed -re 's/[[:space:]][[:space:]]+/|/g' | cut -d"|" -f1,3 | grep "|"`
9090
echo -e "Container Status Up:\n$constat"
9191
echo "ElasticSearch Port: '$elasticsearchport'"
@@ -99,7 +99,8 @@ jobs:
9999
- name: Run the Elastic Search Indexation
100100
run: |
101101
echo "ElasticSearch Version:"
102-
docker-compose exec -T api curl -v 'elasticsearch:9200'
102+
curl "localhost:$ES_PORT" 2>&1
103+
echo "ElasticSearch Port: '$ES_PORT'"
103104
echo "Indexation: starting ..."
104105
docker-compose exec -T api index-cpan.sh
105106
echo "Indexation: Indices showing ..."

0 commit comments

Comments
 (0)