Skip to content

Commit

Permalink
Merge pull request #57 from linkernetworks/hwchiu/try-to-fix-jenkis
Browse files Browse the repository at this point in the history
Wait the prometheus
  • Loading branch information
John-Lin authored Jul 3, 2018
2 parents 002ce61 + 5f138d8 commit ee1f82e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion jenkins/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ sudo service docker start
mkdir -p /home/jenkins/data/mongo
nohup mongod --dbpath=/home/jenkins/data/mongo 2>&1 > /dev/null &
docker run --name prometheus -d -p 9090:9090 prom/prometheus

for i in `seq 1 20`
do
curl http://127.0.0.1:9090/api/v1/query?query=prometheus_build_info > /dev/null
ret=$?
if [ "$ret" = "0" ]; then
break
fi
sleep 1
done
sudo chown -R jenkins:jenkins /home/jenkins

bash

0 comments on commit ee1f82e

Please sign in to comment.