od-database/jenkins/Jenkinsfile
2019-03-24 20:23:05 -04:00

24 lines
581 B
Groovy

def remote = [:]
remote.name = 'remote'
remote.host = env.DEPLOY_HOST
remote.user = env.DEPLOY_USER
remote.identityFile = '/var/lib/jenkins/.ssh/id_rsa'
remote.knownHosts = '/var/lib/jenkins/.ssh/known_hosts'
pipeline {
agent any
stages {
stage('Build') {
steps {
sh './jenkins/build.sh'
stash includes: 'env/', name: 'env'
}
}
stage('Deploy') {
steps {
sshPut remote: remote, from: '.', into: 'oddb'
sshCommand remote: remote, command: 'chmod +x oddb/deploy.sh && ./oddb/deploy.sh'
}
}
}
}