This is step one. We'll create a venv the old way and also additionally a bundle. If the bundle exists on the copy-venv side of things, we'll install using it. Otherwise, we'll just do the old relocation code. After a day or two (once all of the venv artifacts have bundles) we can remove the use of install_venv and just go to pure bundles. Change-Id: Ie56e270ac4944a29253609730b013166cae05c26
24 lines
659 B
Bash
Executable File
24 lines
659 B
Bash
Executable File
#!/bin/bash -xe
|
|
|
|
# Make sure there is a location on this builder to cache pip downloads
|
|
mkdir -p ~/cache/pip
|
|
export PIP_DOWNLOAD_CACHE=~/cache/pip
|
|
|
|
# Start with a clean slate
|
|
rm -fr jenkins_venvs
|
|
mkdir -p jenkins_venvs
|
|
|
|
# Build a venv for every known branch
|
|
for branch in `git branch -r |grep "origin/"|grep -v HEAD|sed "s/origin\///"`
|
|
do
|
|
echo "Building venv for $branch"
|
|
git checkout $branch
|
|
mkdir -p jenkins_venvs/$branch
|
|
python tools/install_venv.py
|
|
virtualenv --relocatable .venv
|
|
pip bundle .cache.bundle -r tools/pip-requires
|
|
tar cvfz jenkins_venvs/$branch/venv.tgz .venv .cache.bundle
|
|
rm -fr .venv .cache.bundle
|
|
done
|
|
git checkout master
|