a7cd611c78
This change aligns the Mistral documents folder structure to the one specified for Pike [1]. Documents were move to thir appropriate folder, but the different guides do not follow their cookie cutted structure yet. Install guide is in a separate change [2], while I could not found the cookie cutter for the rest of the guides. test-requirements.txt updated with the missing modules. tox_install.sh modified to do not pass $MODULE_NAME and -e parameter to edit-constraints. [1]: http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html [2]: https://review.openstack.org/#/c/476499/ [3]: https://etherpad.openstack.org/p/doc-migration-tracking Change-Id: Ia1101fa2eada446d8eebfefa9bd15d8facd8b3b0 Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454 Signed-off-by: csatari <gergely.csatari@nokia.com>
58 lines
1.8 KiB
Bash
Executable File
58 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Upper constraint file contains mistral version(used by tripleo-common) pin
|
|
# that is in conflict with installing mistral from source. We should replace
|
|
# the version pin in the constraints file before applying it for from-source
|
|
# installation.
|
|
|
|
ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
|
|
BRANCH_NAME=master
|
|
MODULE_NAME=mistral
|
|
requirements_installed=$(echo "import openstack_requirements" | python 2>/dev/null ; echo $?)
|
|
|
|
set -e
|
|
|
|
CONSTRAINTS_FILE=$1
|
|
shift
|
|
|
|
install_cmd="pip install"
|
|
mydir=$(mktemp -dt "$MODULE_NAME-tox_install-XXXXXXX")
|
|
trap "rm -rf $mydir" EXIT
|
|
localfile=$mydir/upper-constraints.txt
|
|
if [[ $CONSTRAINTS_FILE != http* ]]; then
|
|
CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
|
|
fi
|
|
curl $CONSTRAINTS_FILE -k -o $localfile
|
|
install_cmd="$install_cmd -c$localfile"
|
|
|
|
if [ $requirements_installed -eq 0 ]; then
|
|
echo "ALREADY INSTALLED" > /tmp/tox_install.txt
|
|
echo "Requirements already installed; using existing package"
|
|
elif [ -x "$ZUUL_CLONER" ]; then
|
|
echo "ZUUL CLONER" > /tmp/tox_install.txt
|
|
pushd $mydir
|
|
$ZUUL_CLONER --cache-dir \
|
|
/opt/git \
|
|
--branch $BRANCH_NAME \
|
|
git://git.openstack.org \
|
|
openstack/requirements
|
|
cd openstack/requirements
|
|
$install_cmd -e .
|
|
popd
|
|
else
|
|
echo "PIP HARDCODE" > /tmp/tox_install.txt
|
|
if [ -z "$REQUIREMENTS_PIP_LOCATION" ]; then
|
|
REQUIREMENTS_PIP_LOCATION="git+https://git.openstack.org/openstack/requirements@$BRANCH_NAME#egg=requirements"
|
|
fi
|
|
$install_cmd -U -e ${REQUIREMENTS_PIP_LOCATION}
|
|
fi
|
|
|
|
# This is the main purpose of the script: Allow local installation of
|
|
# the current repo. It is listed in constraints file and thus any
|
|
# install will be constrained and we need to unconstrain it.
|
|
#edit-constraints $localfile -- $MODULE_NAME "-e file://$PWD#egg=$MODULE_NAME"
|
|
edit-constraints $localfile -- --
|
|
|
|
$install_cmd -U $*
|
|
exit $?
|