Semaphore/deployment/docker/ci/dredd/entrypoint
tom whiston cccc00d113 use dredd for api testing
add ci context docker deployment
update api docs
add some small fixes
2018-04-18 18:03:15 +00:00

25 lines
447 B
Bash
Executable File

#!/usr/bin/env bash
set -e
echo "---> Add Config"
cat > ./.dredd/config.json <<EOF
{
"mysql": {
"host": "${MYSQL_SERVICE}:${MYSQL_PORT}",
"user": "semaphore",
"pass": "semaphore",
"name": "semaphore"
}
}
EOF
echo "---> Waiting for semaphore"
while ! nc -z ${SEMAPHORE_SERVICE} ${SEMAPHORE_PORT}; do
sleep 1
done
echo "---> Run Dredd"
# We do this because otherwise it can fail out
sleep 5
/home/developer/node_modules/.bin/dredd $@