Merge "Clarify the requirements for the TRIPLEO_ROOT variable"
This commit is contained in:
commit
4e4450fa47
|
@ -156,12 +156,12 @@ fi
|
|||
|
||||
## .. note::
|
||||
|
||||
## By default, devtest.sh uses ``~/.cache/tripleo`` for ``$TRIPLEO_ROOT``.
|
||||
## Unless you're planning to do a one-shot run of ``devtest.sh`` and never
|
||||
## look at the code installed or the artifacts generated, you should
|
||||
## set this value to something more convenient to you.
|
||||
## This will be used by devtest.sh and other scripts to store the
|
||||
## additional tools, images, packages, tarballs and everything else
|
||||
## needed by the deployment process. The tripleo-incubator tools must
|
||||
## be cloned within your ``$TRIPLEO_ROOT``.
|
||||
|
||||
## #. Create the directory and check out the code
|
||||
## #. Create the directory and clone tripleo-incubator within ``$TRIPLEO_ROOT``
|
||||
|
||||
## ::
|
||||
|
||||
|
@ -215,7 +215,7 @@ fi
|
|||
## the root of your checkout::
|
||||
|
||||
## source scripts/devtest_variables.sh
|
||||
source $(dirname $0)/devtest_variables.sh #nodocs
|
||||
source $SCRIPT_HOME/devtest_variables.sh #nodocs
|
||||
|
||||
## #. See :doc:`devtest_setup` for documentation.
|
||||
## $CONTINUE should be set to '--trash-my-machine' to have it execute
|
||||
|
|
|
@ -202,25 +202,9 @@ fi
|
|||
## use is your own, but you can also setup a dedicated user if you choose.
|
||||
## ::
|
||||
|
||||
mkdir -p $TRIPLEO_ROOT
|
||||
cd $TRIPLEO_ROOT
|
||||
|
||||
## #. git clone this repository to your local machine.
|
||||
## The DIB_REPOLOCATION_tripleo_incubator and DIB_REPOREF_tripleo_incubator
|
||||
## environment variables will be honoured, if set.
|
||||
## ::
|
||||
|
||||
### --end
|
||||
if [ "$USE_CACHE" == "0" ] ; then
|
||||
if [ ! -d $TRIPLEO_ROOT/tripleo-incubator ]; then
|
||||
### --include
|
||||
git clone ${DIB_REPOLOCATION_tripleo_incubator:-"https://git.openstack.org/openstack/tripleo-incubator"} tripleo-incubator
|
||||
pushd tripleo-incubator
|
||||
git checkout ${DIB_REPOREF_tripleo_incubator:-master}
|
||||
popd
|
||||
### --end
|
||||
|
||||
elif [ -z "${ZUUL_REF:-''}" ]; then
|
||||
if [ -z "${ZUUL_REF:-''}" ]; then
|
||||
cd $TRIPLEO_ROOT/tripleo-incubator ; git pull
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -35,26 +35,26 @@ export LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"virtio"}
|
|||
|
||||
export LIBVIRT_VOL_POOL=${LIBVIRT_VOL_POOL:-"default"}
|
||||
|
||||
## #. Set ``TRIPLEO_ROOT``, if it wasn't already set. See note in :doc:`devtest`
|
||||
## for discussion on suggested values for ``TRIPLEO_ROOT``
|
||||
|
||||
## #. The tripleo-incubator tools must be available at
|
||||
## ``$TRIPLEO_ROOT/tripleo-incubator``. See the :doc:`devtest` documentation
|
||||
## which describes how to set that up correctly.
|
||||
## ::
|
||||
|
||||
export TRIPLEO_ROOT=${TRIPLEO_ROOT:-~/.cache/tripleo}
|
||||
|
||||
|
||||
## #. The TripleO tools will get (or have already been, if you followed the
|
||||
## suggestions in :doc:`devtest`) installed in
|
||||
## ``$TRIPLEO_ROOT/tripleo-incubator/scripts`` - you need to add that to the
|
||||
## ``$PATH``.
|
||||
|
||||
## ::
|
||||
export TRIPLEO_ROOT=${TRIPLEO_ROOT:-} #nodocs
|
||||
|
||||
### --end
|
||||
if [ ! -d "$TRIPLEO_ROOT/tripleo-incubator/scripts" ]; then
|
||||
echo ERROR: Cannot find "$TRIPLEO_ROOT/tripleo-incubator/scripts".
|
||||
echo " Please set TRIPLEO_ROOT to point to the directory which"
|
||||
echo " contains your tripleo-incubator checkout."
|
||||
## NOTE(gfidente): Keep backwards compatibility by setting TRIPLEO_ROOT
|
||||
## to ~/.cache/tripleo if the var is found empty and the dir exists.
|
||||
if [ -z "$TRIPLEO_ROOT" -a -d ~/.cache/tripleo ]; then
|
||||
echo "WARNING: Defaulting TRIPLEO_ROOT to ~/.cache/tripleo"
|
||||
TRIPLEO_ROOT=~/.cache/tripleo
|
||||
fi
|
||||
|
||||
## NOTE(gfidente): Exit if TRIPLEO_ROOT is still empty or misconfigured
|
||||
if [ -z "$TRIPLEO_ROOT" -o ! -d $TRIPLEO_ROOT/tripleo-incubator/scripts ]; then
|
||||
echo 'ERROR: Cannot find $TRIPLEO_ROOT/tripleo-incubator/scripts'
|
||||
echo ' To use devtest you must export the TRIPLEO_ROOT variable and have cloned tripleo-incubator within that directory.'
|
||||
echo ' Check http://docs.openstack.org/developer/tripleo-incubator/devtest.html#initial-checkout for instructions.'
|
||||
return 1
|
||||
fi
|
||||
### --include
|
||||
|
|
Loading…
Reference in New Issue