From bca849770675d7ca5bbe978b6c9c51176925e9be Mon Sep 17 00:00:00 2001 From: s00ner Date: Fri, 18 Feb 2022 15:27:20 -0500 Subject: [PATCH] New aproach, using jenkins agent --- Jenkinsfile | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 94a6e7b..6869dc4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,20 +5,15 @@ pipeline { agent any - stages { - stage('Upload') { + node("BHTH web server") { + stage('Everything') { steps { - sshagent(credentials: ['baltimore-wiki']) { - sh ''' - [ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh - ssh-keyscan -t rsa,dsa baltimore-wiki.lxd >> ~/.ssh/known_hosts - ssh mdbook@baltimore-wiki.lxd << EOF + sh ''' cd $(mktemp -d); wget https://git.doublehack.me/s00ner/Baltimore-hackthebox-knowledgebase/archive/main.tar.gz; tar -xf main.tar.gz; rsync --recursive --exclude 'Jenkinsfile' --delete ./baltimore-hackthebox-knowledgebase/ /home/mdbook/wiki/src/; rm -rf $(pwd); -EOF ''' }