Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Updating a local Pip cache based on a Jenkins server.
#!/bin/bash
set -e
echo 'Creating ~/.pip-cache...'
mkdir -p ~/.pip-cache
echo 'Writing ~/.pip/pip.conf...'
mkdir -p ~/.pip
if [ ! -f ~/.pip/pip.conf ];
then
echo "[install]
download-cache = ~/.pip-cache" > ~/.pip/pip.conf
fi
echo 'Populating cache from the Jenkins cache...'
rsync -av -e ssh jenkins@jenkins.internal:~/.pip-cache ~/.pip-cache
echo 'Done.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.