2017-04-26 21:53:15 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o errexit -o nounset
|
|
|
|
|
2017-04-27 04:53:25 +02:00
|
|
|
if docker -v; then
|
2017-04-26 21:53:15 +02:00
|
|
|
|
2017-04-27 04:53:25 +02:00
|
|
|
# generate a unique string for CI deployment
|
|
|
|
export KEY=$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-z' | head -c 12)
|
|
|
|
export PASSWORD=$KEY$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'A-Z' | head -c 2)$(cat /dev/urandom | env LC_CTYPE=C tr -cd '0-9' | head -c 2)
|
2017-04-26 21:53:15 +02:00
|
|
|
|
2017-04-27 04:53:25 +02:00
|
|
|
/bin/sh ./deploy.ci.sh
|
2017-04-26 21:53:15 +02:00
|
|
|
|
2017-04-27 04:53:25 +02:00
|
|
|
else
|
|
|
|
echo "Docker is used to run terraform commands, please install before run: https://docs.docker.com/docker-for-mac/install/"
|
2017-05-04 11:57:54 +02:00
|
|
|
fi
|