-
-
Save mosdevly/74284125d7eb358ec878 to your computer and use it in GitHub Desktop.
template jenkins/hudson build script for python with virtualenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WORKSPACE set to job workspace by jenkins/hudson | |
VENV="$WORKSPACE/.env" | |
if [ ! -e "$VENV" ]; then | |
virtualenv --python python2.6 --no-site-packages $VENV | |
elif [ ! -d "$VENV" ]; then | |
echo '$VENV exists but is not a directory' | |
exit 1 | |
fi | |
. .env/bin/activate | |
python setup.py develop | |
nosetests --with-xunit test/ | |
deactivate | |
# follow this up by publishing nostests.xml as JUnit test result report | |
# you could also have the xunit report generated at an alternate location/name using --xunit-file argument |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment