tripleo-ci/toci_functions.sh
Derek Higgins 48b26a331f Add LogLevel=QUIET to ssh
This removes the recurring messages about adding key to host file
(the hostfile is /dev/null)
2013-05-17 11:32:02 +01:00

29 lines
609 B
Bash

get_get_repo(){
CACHDIR=$TOCI_CACHE_DIR/${1/\//_}
if [ ! -e $CACHDIR ] ; then
git clone https://github.com/$1.git $CACHDIR
else
cd $CACHDIR
git fetch
git reset --hard origin/master
fi
cp -r $CACHDIR $TOCI_WORKING_DIR/${1/\//_}
}
ssh_noprompt(){
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET $@
}
scp_noprompt(){
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=QUIET $@
}
wait_for(){
for x in {0..60} ; do
$@ && return 0 || true
sleep 10
done
return 1
}