Explicitly pass hostname to deploy script.
The script now also pings the hostname to deply to, to see if it's alive before doing anything else.
This commit is contained in:
20
deploy.sh
20
deploy.sh
@@ -1,17 +1,25 @@
|
|||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
production)
|
cloud*)
|
||||||
DEPLOYHOST="cloud.blender.org"
|
DEPLOYHOST="$1"
|
||||||
;;
|
|
||||||
staging)
|
|
||||||
DEPLOYHOST="cloud2"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Use $0 cloud|staging" >&2
|
echo "Use $0 cloud{nr}|cloud.blender.org" >&2
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
echo -n "Deploying to ${DEPLOYHOST}... "
|
||||||
|
|
||||||
|
if ! ping ${DEPLOYHOST} -q -c 1 -w 2 >/dev/null; then
|
||||||
|
echo "host ${DEPLOYHOST} cannot be pinged, refusing to deploy." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "press [ENTER] to continue, Ctrl+C to abort."
|
||||||
|
read dummy
|
||||||
|
|
||||||
|
|
||||||
# Deploys the current production branch to the production machine.
|
# Deploys the current production branch to the production machine.
|
||||||
PROJECT_NAME="blender-cloud"
|
PROJECT_NAME="blender-cloud"
|
||||||
DOCKER_NAME="blender_cloud"
|
DOCKER_NAME="blender_cloud"
|
||||||
|
Reference in New Issue
Block a user