Do not sync requirements to possibly capped library's master branch

We've hit a situation where a project (pycadf) is listed and capped
in stable/icehouse requirements.txt.  pycadf is also listed in
projects.txt. As part of the requirements integration test, we are
attempting to update pycadf's master branch with stable/icehouse
requirements, and failing because of new dependencies in pycadf that
are not managed by stable/icehouse's GR.

This updates integration.sh so that when we're testing a stable branch,
we are only syncing requirements to other projects have stable branches.
This avoids trying to sync stable requirements into library's master
branches.

Change-Id: I3b8845ad8e013cf6747995df5a62cc4f2ee85e01
This commit is contained in:
Adam Gandelman 2015-02-21 23:27:18 +01:00 committed by Alan Pevec
parent b4fc711509
commit 8c2ad8c2a8

View File

@ -79,6 +79,16 @@ for PROJECT in $PROJECTS ; do
# requirements doesn't really install
continue
fi
if [[ "$BRANCH" =~ "stable" ]]; then
# When testing stable, only attempt to sync to projects that also
# have a corresponding stable branch. This prevents us from trying and
# failing to sync stable requirements to a library's master branch,
# when that same library may be listed and capped in global-requirements.txt.
proj_branch="$(cd $REPODIR/$SHORT_PROJECT && git rev-parse --symbolic-full-name --abbrev-ref HEAD)"
if [ "$proj_branch" != "$BRANCH" ]; then
continue
fi
fi
# set up the project synced with the global requirements
sudo chown -R $USER $REPODIR/$SHORT_PROJECT