New aproach, using jenkins agent
Gitea/Baltimore-hackthebox-knowledgebase/pipeline/head There was a failure building this commit
Details
Gitea/Baltimore-hackthebox-knowledgebase/pipeline/head There was a failure building this commit
Details
parent
4b79a61b5f
commit
bca8497706
|
@ -5,20 +5,15 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
stages {
|
node("BHTH web server") {
|
||||||
stage('Upload') {
|
stage('Everything') {
|
||||||
steps {
|
steps {
|
||||||
sshagent(credentials: ['baltimore-wiki']) {
|
|
||||||
sh '''
|
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
|
|
||||||
cd $(mktemp -d);
|
cd $(mktemp -d);
|
||||||
wget https://git.doublehack.me/s00ner/Baltimore-hackthebox-knowledgebase/archive/main.tar.gz;
|
wget https://git.doublehack.me/s00ner/Baltimore-hackthebox-knowledgebase/archive/main.tar.gz;
|
||||||
tar -xf main.tar.gz;
|
tar -xf main.tar.gz;
|
||||||
rsync --recursive --exclude 'Jenkinsfile' --delete ./baltimore-hackthebox-knowledgebase/ /home/mdbook/wiki/src/;
|
rsync --recursive --exclude 'Jenkinsfile' --delete ./baltimore-hackthebox-knowledgebase/ /home/mdbook/wiki/src/;
|
||||||
rm -rf $(pwd);
|
rm -rf $(pwd);
|
||||||
EOF
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue