Compare commits
No commits in common. "e52a9bf189fd3833702dfd82c9096dbaf00d8f29" and "f1a1204417d27d9184042489f41629cf97fb0a22" have entirely different histories.
e52a9bf189
...
f1a1204417
|
@ -2,37 +2,19 @@ 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
|
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
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue