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

Former-commit-id: 0418cbf9a00ba07c1e79698ecf264503daf91e62 [formerly 0418cbf9a00ba07c1e79698ecf264503daf91e62 [formerly ee1f82e]]
Former-commit-id: 4d9fdfd3f96f9643608c51bb5dad7934af6aca28
Former-commit-id: 3721696
  • Loading branch information
John-Lin authored Jul 3, 2018
2 parents fb6bd2b + 0af345a commit deb3a1f
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 deb3a1f

Please sign in to comment.