Skip to content
Snippets Groups Projects
Commit 1c801b16 authored by nimrod's avatar nimrod
Browse files

Select host in deploy script.

Select the host in the deploy script, default to all hosts.
parent 5f46fedb
Branches
No related tags found
No related merge requests found
Pipeline #380 passed
#!/bin/sh #!/bin/sh
set -eu set -eu
deploy() { _deploy() {
echo "Deploying to $1" >&2 echo "Deploying to $1" >&2
export DOCKER_HOST="ssh://$1" export DOCKER_HOST="ssh://$1"
export RUNNER_NAME="$1" export RUNNER_NAME="$1"
...@@ -25,10 +25,19 @@ then ...@@ -25,10 +25,19 @@ then
exit 1 exit 1
fi fi
export REGISTER_RUN_UNTAGGED="true" case "${1:-all}" in
ns4) export REGISTER_RUN_UNTAGGED="true"
export BUILDS='/builds' export BUILDS='/builds'
deploy "ns4.shore.co.il" _deploy ns4
export REGISTER_RUN_UNTAGGED="false" ;;
kodi) export REGISTER_RUN_UNTAGGED="false"
unset BUILDS unset BUILDS
deploy "host01.shore.co.il" _deploy kodi
deploy "kodi.shore.co.il" ;;
host01) export REGISTER_RUN_UNTAGGED="false"
unset BUILDS
_deploy host01
;;
all) deploy ns4; deploy host01; deploy kodi ;;
*) echo 'Unknown host.' >&2; exit 1;;
esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment