Skip to content

Instantly share code, notes, and snippets.

@justinabrahms
Created December 4, 2012 00:16
Show Gist options
  • Save justinabrahms/4199302 to your computer and use it in GitHub Desktop.
Save justinabrahms/4199302 to your computer and use it in GitHub Desktop.
virtualenv code saves 2 minutes per build on our boxen.
# Installing things takes a while. Skip if if nothing has changed.
# jenkins requires things to be html escaped to work properly, hence the weird command below
VENV_DIR=`md5sum requirements/* | md5sum 2>&1 | awk '{print $1}'`
if [ -e $VENV_DIR ]; then
. /tmp/$VENV_DIR/bin/activate
else
virtualenv --no-site-packages /tmp/$VENV_DIR
. /tmp/$VENV_DIR/bin/activate
pip install --download-cache /var/lib/jenkins/.pip_download_cache -r requirements/ci.txt
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment