I have installed Jenkins on Ubuntu 15.10. In a Jenkins job I have a single Execute Shell step with:
virtualenv --no-site-packages virtual_django
cd virtual_django/bin
pwd
dir
source activate
When I run the job I get:
+ virtualenv --no-site-packages virtual_django
New python executable in virtual_django/bin/python2
Also creating executable in virtual_django/bin/python
Installing setuptools, pip...done.
Running virtualenv with interpreter /usr/bin/python2
+ cd virtual_django/bin
+ pwd
/var/lib/jenkins/workspace/django-demo/virtual_django/bin
+ dir
activate activate.fish easy_install pip pip2.7 python2
activate.csh activate_this.py easy_install-2.7 pip2 python python2.7
+ source activate
/tmp/hudson4515625893361069094.sh: 9: /tmp/hudson4515625893361069094.sh: source: not found
Build step 'Execute shell' marked build as failure
So in the Jenkins job the source command is not found. It works fine from a terminal where I have logged in as the jenkins user.
Why can't the above script find the source command when run inside the Jenkins job?