mirror of
https://github.com/simon987/od-database.git
synced 2025-04-10 14:06:45 +00:00
50 lines
2.4 KiB
Groovy
50 lines
2.4 KiB
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'
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'echo $ODDB_CONFIG > config.py'
|
|
sshCommand remote: remote, command: "cd od-database && rm -rf env fold_to_ascii search static task_tracker_drone templates ws_bucket_client *.py deploy.sh"
|
|
sshPut remote: remote, from: 'requirements.txt', into: 'od-database'
|
|
sshPut remote: remote, from: 'fold_to_ascii', into: 'od-database'
|
|
sshPut remote: remote, from: 'search', into: 'od-database'
|
|
sshPut remote: remote, from: 'static', into: 'od-database'
|
|
sshPut remote: remote, from: 'task_tracker_drone', into: 'od-database'
|
|
sshPut remote: remote, from: 'templates', into: 'od-database'
|
|
sshPut remote: remote, from: 'ws_bucket_client', into: 'od-database'
|
|
sshPut remote: remote, from: '__init__.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'api.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'app.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'captcha.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'common.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'database.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'export.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'init_script.sql', into: 'od-database'
|
|
sshPut remote: remote, from: 'od_util.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'reddit_bot.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'tasks.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'template_filters.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'uwsgi.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'views.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'config.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'mass_import.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'do_recrawl.py', into: 'od-database'
|
|
sshPut remote: remote, from: 'od-database.ini', into: 'od-database'
|
|
sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'od-database'
|
|
sshCommand remote: remote, command: 'chmod +x od-database/deploy.sh && ./od-database/deploy.sh'
|
|
}
|
|
}
|
|
}
|
|
} |