So I was trying to do something like this, and I created this bash script which locally works perfectly fine.
However it doesn't seem to work at all with the error pasted below.
Is Jenkins able to run any bash script?
It seems like it should be I'm not sure why it gives this error though..
#!/bin/bash
SPOTLIGHT_PID="not"
API_PID="not"
function create_ve {
if [ ! -d ve ]
then virtualenv ve
fi
}
function start_spotlight {
cd wazoku-spotlight/spotlight
create_ve
ve/bin/pip install -r test-requirements.txt
ve/bin/python manage.py runserver &
SPOTLIGHT_PID=$!
cd -
}
start_spotlight
cd wazoku-spotlight/spotlight
ve/bin/python manage.py test tests/integration --with-xunit
kill $SPOTLIGHT_PID
ERROR:
Pip.....................................................................................................................................................................................................................................................................................................................................done.
./run-tests-jenkins.sh: ve/bin/pip: "/var/lib/jenkins/jobs/spotlight: bad interpreter: No such file or directory
/var/lib/jenkins/jobs/spotlight integration and selenium/workspace
Traceback (most recent call last):
File "run.py", line 1, in <module>
from bottle import run
ImportError: No module named bottle
New python executable in ve/bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing