Compare commits

..

No commits in common. "e52a9bf189fd3833702dfd82c9096dbaf00d8f29" and "f1a1204417d27d9184042489f41629cf97fb0a22" have entirely different histories.

1 changed files with 5 additions and 23 deletions

24
Jenkinsfile vendored
View File

@ -2,33 +2,15 @@ pipeline {
agent any agent any
stages { stages {
stage('Deploy Main branch') { stage('Do nothing') {
when {
branch 'main'
}
steps { steps {
sh '/bin/true'
sshagent(credentials: ['baltimore-wiki']) { sshagent(credentials: ['baltimore-wiki']) {
sh ''' sh '''
[ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh [ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh
ssh-keyscan -t rsa,dsa baltimore-wiki.lxd >> ~/.ssh/known_hosts ssh-keyscan -t rsa,dsa baltimore-wiki.lxd >> ~/.ssh/known_hosts
ssh mdbook@baltimore-wiki.lxd << EOF ssh mdbook@baltimore-wiki.lxd << EOF
echo "main branch" >> ~/test echo "testing" >> ~/test
EOF
'''
}
}
}
stage('Deploy Testing branch') {
when {
branch 'testing'
}
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
echo "testing branch" >> ~/test
EOF EOF
''' '''
} }