mirror of
https://src.koozali.org/infra/smeserver-koji.git
synced 2024-11-21 17:17:28 +01:00
remove now superfluous builder function
This commit is contained in:
parent
5ab4da371e
commit
eeefccf002
@ -215,52 +215,13 @@ EOF
|
||||
fi
|
||||
|
||||
# add builders
|
||||
deploy_builder () {
|
||||
local FQDN=$1
|
||||
# check if server available on port 22
|
||||
until (nc -z $FQDN 22 2>/dev/null)
|
||||
do
|
||||
echo "I cannot connect to $FQDN! Is it online? "
|
||||
echo "Options:"
|
||||
echo "- FQDN=<FQDN of build server> # if you've mis-typed the name"
|
||||
echo "- IP=<IP of build server> # I'll add this to your /etc/hosts file"
|
||||
echo "- <enter> # try again (I've started the server)"
|
||||
echo "- Q # quit this loop (give up)"
|
||||
read RESPONSE
|
||||
case $RESPONSE in
|
||||
Q | q )
|
||||
break
|
||||
;;
|
||||
null )
|
||||
continue
|
||||
;;
|
||||
IP=* )
|
||||
BIP=${RESPONSE#*=}
|
||||
# add this builder into the hosts file
|
||||
echo "$BIP $FQDN\n" >> /etc/hosts
|
||||
continue
|
||||
;;
|
||||
FQDN=* )
|
||||
FQDN=${RESPONSE#*=}
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# we found the server and will deploy to it
|
||||
koji-add-builder.sh $FQDN $DEBUG
|
||||
}
|
||||
|
||||
if [ -z $KOJI_BUILD_FQDNS ] ; then
|
||||
# use hub if no builders entered
|
||||
deploy_builder $KOJI_HUB_FQDN
|
||||
koji-add-builder.sh $KOJI_HUB_FQDN $DEBUG
|
||||
else
|
||||
# use builders added as command line parameters
|
||||
for FQDN in ${KOJI_BUILD_FQDNS} ; do
|
||||
deploy_builder $FQDN
|
||||
koij-add-builder.sh $FQDN $DEBUG
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user