Semaphore/deployment/docker/ci/dredd/entrypoint
2020-02-09 19:52:25 +02:00

26 lines
423 B
Bash
Executable File

#!/usr/bin/env bash
set -e
echo "---> Add Config"
cat > /semaphore/.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
dredd $@