user must configure a jenkins ssh key

This commit is contained in:
Anthony Young 2011-11-15 13:30:20 -08:00
parent 69257f2534
commit 977b334690

View File

@ -10,13 +10,6 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
# Make sure user has configured an ssh pubkey
if [ ! -e /root/.ssh/id_rsa.pub ]; then
echo "Public key is missing. This is used to ssh into your instances."
echo "Please run ssh-keygen before proceeding"
exit 1
fi
# This directory
CUR_DIR=$(cd $(dirname "$0") && pwd)
@ -42,6 +35,13 @@ if [ ! -e /var/lib/jenkins ]; then
exit 1
fi
# Make sure user has configured a jenkins ssh pubkey
if [ ! -e /var/lib/jenkins/.ssh/id_rsa.pub ]; then
echo "Public key for jenkins is missing. This is used to ssh into your instances."
echo "Please run "su -c ssh-keygen jenkins" before proceeding"
exit 1
fi
# Setup sudo
JENKINS_SUDO=/etc/sudoers.d/jenkins
cat > $JENKINS_SUDO <<EOF