Added shared key authentication option

This commit is contained in:
Jon Ervine 2021-02-17 22:09:19 +08:00
parent e3358168f3
commit f3730a1427
2 changed files with 5 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -27,9 +27,12 @@ spec:
stage('Build with Kaniko') {
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-wetty.git', credentialsId: 'jenkins-to-git'
container('kaniko') {
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:1.3'
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:1.3.1'
}
}
stage('Notify gchat') {
hangoutsNotify message: "WeTTy on Alpine Linux has built",token: "A2ET831pVslqXTqAx6ycu573r",threadByJob: false
}
}
}

2
run.sh Executable file → Normal file
View File

@ -9,7 +9,7 @@ if [ "x${REMOTE_SSH_SERVER}" == "x" ]; then
npm start -- -p 3000
else
# SSH connect mode
cmd="npm start -- -p 3000 --sshhost ${REMOTE_SSH_SERVER} --sshport ${REMOTE_SSH_PORT} --base ${BASE}"
cmd="npm start -- -p 3000 --sshhost ${REMOTE_SSH_SERVER} --sshport ${REMOTE_SSH_PORT} --sshauth ${SSH_AUTH} --base ${BASE}"
if ! [ "x${REMOTE_SSH_USER}" == "x" ]; then
cmd="${cmd} --sshuser ${REMOTE_SSH_USER}"
fi