Modify docker_start to wait for resources to boot up

This commit is contained in:
Brandon Myers 2018-09-18 11:28:29 -05:00
Родитель 3ae7d12f5b
Коммит 038531fad8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 8AA79AD83045BBC7
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -136,6 +136,8 @@ EOF
--secret-keyring ~/.mig/secring.gpg \
--export -a $(whoami)@localhost \
> ~/.mig/$(whoami)-pubkey.asc
# Wait for all the resources to start up
sleep 5
echo -e "create investigator\n$(whoami)\nyes\nyes\nyes\nyes\n$HOME/.mig/$(whoami)-pubkey.asc\ny\n" | \
/go/bin/mig-console -q
# Install the newly created pubkey in the agents keychain
@ -172,9 +174,6 @@ EOF
# Start integration tests.
start_test() {
# Sleep a number of seconds to give the agent time to register before we run the
# test, the heartbeat interval is 30 seconds so 45 should be sufficient
sleep 45
mig -i /go/src/github.com/mozilla/mig/actions/integration_tests.json || exit 1
}
@ -212,6 +211,11 @@ while true; do
done
sudo service supervisor start
# Sleep a number of seconds to give the agent time to register before we run the
# test, the heartbeat interval is 30 seconds so 45 should be sufficient
echo Sleeping for 45 seconds to give resources some time to bootup
sleep 45
if [[ $MIGMODE = "test" ]]; then
start_test
else