user must configure a jenkins ssh key
This commit is contained in:
parent
69257f2534
commit
977b334690
1 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue