Files
training-labs/tools/generate-labs
Pranav Salunke 54dc27e417 Generate windows scripts using st.py in the CI
This patches updates the generate-labs script invoked by the openstack
CI to generate the tar balls and the zip files.

Change-Id: I875fc6496ee81cc66b745baf935afa188ab06312
2017-05-25 13:51:28 +02:00

45 lines
1.1 KiB
Bash
Executable File

#!/bin/bash -
#
# DESCRIPTION
#
# User by tox.ini to create required scripts and tar balls for
# hosting the contents of this project.
#
# Note: Execute this script from the root of the repository for expected
# results.
set -o nounset # Treat unset variables as an error
# This variable is fed by openstack-ci post job as a trigger.
# The value here will be stable/<release-name>
if [ $# -eq 0 ]; then
release="current"
else
release=$1
fi
# Replace '/' with '-' for renaming stable/<release-name> to
# stable-<release-name>
release=${release////-}
echo "Current OpenStack release: $release"
# Create required folders
mkdir -p ./build/dist/
# Create tarball of labs scripts for Linux/OS X users
echo 'Creating the tar-balls.'
tar --exclude=*.iso \
--exclude=*.vdi \
--exclude=*.log \
--exclude=*.auto \
-czf build/dist/labs-${release}.tgz labs/
# Generate Windows batch scripts
labs/st.py -w cluster
#labs/osbash/osbash.sh -w cluster
# Create zip file of labs scripts for Windows users
echo 'Generating zip files.'
zip -r build/dist/labs-${release}.zip labs/osbash \
-x \*.iso \*.vdi \*.log \*.auto