mirror of
https://github.com/simon987/od-database.git
synced 2025-12-15 07:39:04 +00:00
Use task_tracker for task tracking
This commit is contained in:
24
jenkins/Jenkinsfile
vendored
Normal file
24
jenkins/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
9
jenkins/build.sh
Executable file
9
jenkins/build.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
virtualenv env --download --clear -p python3.7
|
||||
source env/bin/activate
|
||||
python --version
|
||||
|
||||
pip install -r requirements.txt
|
||||
git submodule update --remote --recursive
|
||||
deactivate
|
||||
9
jenkins/deploy.sh
Executable file
9
jenkins/deploy.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
export ODDBROOT="od-database"
|
||||
|
||||
screen -S oddb -X quit
|
||||
echo "starting oddb_web"
|
||||
screen -S tt_drone -d -m bash -c "cd ${ODDBROOT} && uwsgi od-database.ini"
|
||||
sleep 1
|
||||
screen -list
|
||||
Reference in New Issue
Block a user