forked from emonty/openstack-ci
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts to build and copy bundle files. Tell tarball script how to use tox. Change-Id: Ia9547bffb9274bf67a9cf2be169d6630de8e374e
- Loading branch information
Showing
3 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/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 | ||
if [ -f tools/test-requires ] ; then | ||
pip bundle jenkins_venvs/$branch/.cache.bundle -r tools/pip-requires -r tools/test-requires | ||
else | ||
pip bundle jenkins_venvs/$branch/.cache.bundle -r tools/pip-requires | ||
fi | ||
done | ||
git checkout master |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -xe | ||
|
||
# Support jobs, such as nova-docs, which are not yet triggered by gerrit | ||
if [ "x$GERRIT_BRANCH" = "x" ] ; then | ||
GERRIT_BRANCH=master | ||
fi | ||
mv jenkins_venvs/$GERRIT_BRANCH/.cache.bundle . | ||
rm -fr jenkins_venvs | ||
|
||
if [ -f tools/test-requires -a \ | ||
`git diff HEAD^1 tools/test-requires 2>/dev/null | wc -l` -gt 0 -o \ | ||
`git diff HEAD^1 tools/pip-requires 2>/dev/null | wc -l` -gt 0 ] | ||
then | ||
rm .cache.bundle | ||
fi |
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