# RELEASE_TAG=Beryllium-SR1 # Example
# RELEASE_BRANCH=stable/beryllium # Example
+LFTOOLS_DIR="$WORKSPACE/.venv-lftools"
+if [ ! -d "$LFTOOLS_DIR" ]
+then
+ virtualenv $LFTOOLS_DIR
+ source $LFTOOLS_DIR/bin/activate
+ pip install --upgrade pip
+ pip freeze
+ pip install lftools
+fi
+source "$LFTOOLS_DIR/bin/activate"
+
# Directory to put git format-patches
PATCH_DIR=`pwd`/patches
echo $RELEASE_TAG
-./scripts/version.sh release $RELEASE_TAG
+lftools version release $RELEASE_TAG
git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true"
git commit -am "Release $RELEASE_TAG"
| egrep -e ':.*Git bundle.*' \
| cut -d: -f1`
rm $PATCH_DIR/*.bundle
-
</project>
EOF
-mkdir -p $ARCHIVES_DIR
-mkdir -p $WORKSPACE/archives
-if [ ! -z "${{ARCHIVE_ARTIFACTS}}" ]; then
- pushd $WORKSPACE
+mkdir -p "$ARCHIVES_DIR"
+mkdir -p "$WORKSPACE/archives"
+if [ ! -z "$ARCHIVE_ARTIFACTS" ]; then
+ pushd "$WORKSPACE"
shopt -s globstar # Enable globstar to copy archives
- archive_artifacts=$(echo ${{ARCHIVE_ARTIFACTS}})
- for f in $archive_artifacts; do
+ for f in $ARCHIVE_ARTIFACTS; do
+ [[ -e $f ]] || continue # handle the case of no files to archive
echo "Archiving $f"
- mkdir -p $WORKSPACE/archives/$(dirname $f)
- mv $f $WORKSPACE/archives/$f
+ dir=$(dirname "$f")
+ mkdir -p "$WORKSPACE/archives/$dir"
+ mv "$f" "$WORKSPACE/archives/$f"
done
shopt -u globstar # Disable globstar once archives are copied
popd
scp "${!CONTROLLERIP}:/tmp/odl${i}_karaf.log.tar" "${WORKSPACE}/odl${i}_karaf.log.tar"
tar -xvf ${WORKSPACE}/odl${i}_karaf.log.tar -C . --strip-components 2 --transform s/karaf/odl${i}_karaf/g
grep "ROBOT MESSAGE\| ERROR " odl${i}_karaf.log > odl${i}_err.log
- grep "ROBOT MESSAGE\| Exception " odl${i}_karaf.log > odl${i}_exception.log
+ grep "ROBOT MESSAGE\|Exception" odl${i}_karaf.log > odl${i}_exception.log
grep "ROBOT MESSAGE\| ERROR \| WARN \|Exception" odl${i}_karaf.log > odl${i}_err_warn_exception.log
rm ${WORKSPACE}/odl${i}_karaf.log.tar
done
create_control_node_local_conf
scp ${WORKSPACE}/local.conf_control ${OPENSTACK_CONTROL_NODE_IP}:/opt/stack/devstack/local.conf
+cat > "${WORKSPACE}/manual_install_package.sh" << EOF
+cd /opt/stack
+git clone "\$1"
+cd "\$2"
+git checkout "\$3"
+sudo python setup.py install
+
+EOF
+
# Workworund for successful stacking with Mitaka
if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then
# the problem has been solved with version 1.17. If the latest version of paramiko is used, it causes
# other timeout problems
ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /openstacksdk/d upper-constraints.txt; sed -i /libvirt-python/d upper-constraints.txt; sed -i /paramiko/d upper-constraints.txt"
+ scp "${WORKSPACE}/manual_install_package.sh" "${OPENSTACK_CONTROL_NODE_IP}:/tmp"
ssh ${OPENSTACK_CONTROL_NODE_IP} "sudo pip install deprecation"
- ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://github.com/openstack/python-openstacksdk; cd python-openstacksdk; sudo python setup.py install"
- ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack; git clone https://github.com/paramiko/paramiko; cd paramiko; git checkout 1.17; sudo python setup.py install"
+ # Fix for recent requirements update in the master branch of the sdk.The section must be replaced with a better fix.
+ ssh "${OPENSTACK_CONTROL_NODE_IP}" "sh /tmp/manual_install_package.sh https://github.com/openstack/python-openstacksdk python-openstacksdk 0.9.14"
+ ssh "${OPENSTACK_CONTROL_NODE_IP}" "sh /tmp/manual_install_package.sh https://github.com/paramiko/paramiko paramiko 1.17"
fi
ssh ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"