mirror of
https://github.com/simon987/od-database.git
synced 2025-04-10 14:06:45 +00:00
24 lines
581 B
Groovy
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'
|
|
}
|
|
}
|
|
}
|
|
} |