I am running Jenkins on Ubuntu 15.10. I have the following bash script:

#!/bin/bash
STAGING_DIR="staging"

rm -Rf $STAGING_DIR
mkdir $STAGING_DIR
cd $STAGING_DIR

git clone [path-to-my-git-repo] .

virtualenv --no-site-packages virtual_django
source virtual_django/bin/activate
pip install django

python manage.py runserver 0.0.0.0:8000

When I run the above script in a shell build step the build just hangs with 
this in the build log:

Cloning into '.'...

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

Downloading/unpacking django

Installing collected packages: django

Successfully installed django

Cleaning up...


When I run the same script from a terminal on the Ubuntu machine (under the 
jenkins user) it works fine and outputs:


Installing setuptools, pip...done.
Downloading/unpacking django
  Downloading Django-1.9.5-py2.py3-none-any.whl (6.6MB): 6.6MB downloaded
Installing collected packages: django
Successfully installed django
Cleaning up...
Performing system checks...

System check identified no issues (0 silenced).

You have unapplied migrations; your app may not work properly until they 
are applied.
Run 'python manage.py migrate' to apply them.

April 13, 2016 - 19:55:17
Django version 1.9.5, using settings 'mysite.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.




Any ideas why the above script hangs in the Jenkins job but works fine from 
the terminal?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/dddb2f10-356d-4547-ac4a-9d704da10880%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to