Compare commits

...

3 Commits

Author SHA1 Message Date
s00ner e52a9bf189 Hopefully a working jenkins file
Gitea/webhook-testing/pipeline/head This commit looks good Details
2022-02-17 13:37:44 -05:00
s00ner 3613d83934 fixed missing brace
Gitea/webhook-testing/pipeline/head There was a failure building this commit Details
2022-02-17 10:10:22 -05:00
s00ner 89b937ea21 Testing different jenkinsfile
Gitea/webhook-testing/pipeline/head There was a failure building this commit Details
2022-02-17 10:06:20 -05:00
1 changed files with 23 additions and 5 deletions

28
Jenkinsfile vendored
View File

@ -2,19 +2,37 @@ pipeline {
agent any
stages {
stage('Do nothing') {
stage('Deploy Main branch') {
when {
branch 'main'
}
steps {
sh '/bin/true'
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
echo "testing" >> ~/test
echo "main branch" >> ~/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
'''
}
}
}
}
}