From 310f343423311aa331d93bb2b40f0dfd745a8c27 Mon Sep 17 00:00:00 2001 From: simon987 Date: Thu, 4 Apr 2019 21:21:32 -0400 Subject: [PATCH] Deploy fix attempt --- jenkins/Jenkinsfile | 7 ++----- jenkins/build.sh | 6 ------ jenkins/deploy.sh | 8 ++++++-- task_tracker_drone | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/jenkins/Jenkinsfile b/jenkins/Jenkinsfile index dc45ee4..0f9aa9b 100644 --- a/jenkins/Jenkinsfile +++ b/jenkins/Jenkinsfile @@ -16,11 +16,8 @@ pipeline { 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" - sh 'tar -czf env.tar.gz env' - sshPut remote: remote, from: 'env.tar.gz', into: 'od-database' - sshCommand remote: remote, command: 'tar -xzf od-database/env.tar.gz -C od-database && rm od-database/env.tar.gz' - sshPut remote: remote, from: 'jenkins/deploy.sh', into: 'od-database' + 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' diff --git a/jenkins/build.sh b/jenkins/build.sh index cf89b16..af57e90 100755 --- a/jenkins/build.sh +++ b/jenkins/build.sh @@ -1,10 +1,4 @@ #!/bin/bash -virtualenv env --download --clear -p python3.7 -source env/bin/activate -python --version - -pip install -r requirements.txt git submodule init git submodule update --remote --recursive -deactivate diff --git a/jenkins/deploy.sh b/jenkins/deploy.sh index 4ee634a..1862a2c 100755 --- a/jenkins/deploy.sh +++ b/jenkins/deploy.sh @@ -2,12 +2,16 @@ export ODDBROOT="od-database" +virtualenv ${ODDBROOT}/env -p python3.7 +source ${ODDBROOT}/env/bin/activate +pip install -r ${ODDBROOT}/requirements.txt + screen -S oddb_web -X quit killall -9 uwsgi -sleep 30 +sleep 15 echo "starting oddb_web" -screen -S oddb_web -d -m bash -c "cd ${ODDBROOT} && uwsgi od-database.ini 2> stderr.txt" +screen -S oddb_web -d -m bash -c "cd ${ODDBROOT} && source env/bin/activate && uwsgi od-database.ini 2> stderr.txt" sleep 1 screen -list \ No newline at end of file diff --git a/task_tracker_drone b/task_tracker_drone index 3aa187c..7981e0a 160000 --- a/task_tracker_drone +++ b/task_tracker_drone @@ -1 +1 @@ -Subproject commit 3aa187c2c47d85741afc2beec59f5c6b7110e1e7 +Subproject commit 7981e0aebc859018177dcd1c55b93eb772ee555d