Skip to content

Instantly share code, notes, and snippets.

@bracki
Created March 30, 2012 08:05
Show Gist options
  • Save bracki/2249222 to your computer and use it in GitHub Desktop.
Save bracki/2249222 to your computer and use it in GitHub Desktop.
Simple bootstrap of virtualenv for Jenkins
#!/bin/bash
VENV="$WORKSPACE/.env"
if [ ! -e "virtualenv.py" ]; then
curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
fi
if [ -d $VENV ]; then
echo "**> virtualenv exists"
else
echo "**> creating virtualenv"
python virtualenv.py $VENV
fi
$VENV/bin/pip install nose
$VENV/bin/nosetests --with-xunit path/to/your/tests.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment