Update spectrometer webapp deploy job 69/51269/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 31 Jan 2017 18:07:20 +0000 (13:07 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 31 Jan 2017 18:07:21 +0000 (13:07 -0500)
Some changes to spectrometer-web made the job no longer able to
successfully deploy the web component. This update bumps the
spectrometer node version to 6.9.4 and also adds a few tweaks to help
Spectrometer's deploy job work a little better.

Change-Id: Id07109b9247bf353b03e7a0c91abe27caee10bd3
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/spectrometer/spectrometer-jobs.yaml

index ae66accb78f1ac0d5de2d9d55b3dd7fba463840c..17952afcac89ebb31143041970eafa20f97c1262 100644 (file)
@@ -15,7 +15,7 @@
     rtdproject: 'opendaylight-spectrometer'
     toxdir: server
     nodedir: web
-    nodever: 4.4.6
+    nodever: 6.9.4
     staging-server: spectrometer03.dfw.opendaylight.org
 
 - job-template:
             echo "---> Setup Python"
             if [ -e venv-python34/bin/activate ]; then
                 echo "---> Updating Python dependencies"
+                source venv-python34/bin/activate
             else
                 echo "---> virtualenv not found. Setting up new virtualenv."
-                pyvenv venv-python34
+                pyvenv venv-python34 --without-pip
+                source venv-python34/bin/activate
+                wget https://bootstrap.pypa.io/get-pip.py
+                python get-pip.py
                 pip install -e spectrometer/server
             fi
-            source venv-python34/bin/activate
             pip install --upgrade -r spectrometer/server/requirements.txt
+            pip install --upgrade gunicorn gevent
             pip install --upgrade nodeenv
             pip freeze
 
@@ -75,7 +79,6 @@
                 nodeenv --node={nodever} --prebuilt venv-nodejs
             fi
             source venv-nodejs/bin/activate
-            npm install -g spectrometer/web
             node -v
             npm -v
 
@@ -89,6 +92,7 @@
             pkill node
             sleep 5  # Sleep 5 seconds for cooldown
             cd spectrometer/web
+            npm install
             nohup npm start >> ~/node.out &
 
             EOF