Sergey Kraynev 3d62edef39 Move system-config url to properties
Make system-config url available for configuring by setting
it out of the class. Also add property for choosing which branch should
be used stable or master. By default it will be "master" branch with url
pointing on fuel-infra repository.

Also add UI form for SystemConfig package, which will be used later by
UI forms of Applications.

Change-Id: I52779d9b190ddee1de2243de812e3f7133584b6d
2016-07-20 18:47:15 +03:00

38 lines
810 B
Bash

#!/bin/bash
URL="$1"
BRANCH="$2"
PATCH_ID="$3"
logger Cloning openstack-ci system-config
repository_name="$(basename "$URL")"
if [ -n "$PATCH_ID" ] ; then
git clone $URL
pushd $repository_name
patch_ref=`git ls-remote | grep $PATCH_ID | tail -1 | awk '{print $2}'`
if [ -z "$patch_ref" ] ; then
echo "Patch id $PATCH_ID is not correct."
exit 1
fi
git fetch $URL $patch_ref && git checkout "FETCH_HEAD"
popd
elif [ -n "$BRANCH" ] ; then
git clone $URL --branch $BRANCH
else
git clone $URL
fi
logger Installing openstack-ci system-config
pushd $repository_name
./install_modules.sh
cp -r modules/ /etc/puppet/
# Should be installed on the each node to use
# domain2dn function
puppet module install datacentred-ldap
popd