Skip to content

Commit 51a4c28

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add devstack-version script"
2 parents 9c39cb6 + 2c0faca commit 51a4c28

3 files changed

Lines changed: 29 additions & 1 deletion

File tree

functions

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,21 @@ function get_random_port {
751751
}
752752

753753

754+
function write_devstack_version {
755+
pushd $TOP_DIR
756+
local git_version=""
757+
git_version=$(git log --format="%H %s %ci" -1)
758+
cat - > /tmp/devstack-version <<EOF
759+
#!/bin/bash
760+
761+
echo "DevStack Version: ${DEVSTACK_SERIES} - ${git_version}"
762+
echo "OS Version: ${os_VENDOR} ${os_RELEASE} ${os_CODENAME}"
763+
764+
EOF
765+
sudo install -m 755 /tmp/devstack-version /usr/local/bin/devstack-version
766+
rm /tmp/devstack-version
767+
}
768+
754769
# Restore xtrace
755770
$_XTRACE_FUNCTIONS
756771

stack.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ if [[ ! -r $TOP_DIR/stackrc ]]; then
216216
fi
217217
source $TOP_DIR/stackrc
218218

219+
# this installs a devstack-version script to make it easy to report the version back
220+
write_devstack_version
221+
219222
# Warn users who aren't on an explicitly supported distro, but allow them to
220223
# override check and attempt installation with ``FORCE=yes ./stack``
221224
if [[ ! ${DISTRO} =~ (xenial|yakkety|zesty|stretch|jessie|f24|f25|opensuse-42.2|rhel7|kvmibm1) ]]; then
@@ -1521,19 +1524,28 @@ fi
15211524

15221525
# Warn that a deprecated feature was used
15231526
if [[ -n "$DEPRECATED_TEXT" ]]; then
1524-
echo_summary "WARNING: $DEPRECATED_TEXT"
1527+
echo
1528+
echo -e "WARNING: $DEPRECATED_TEXT"
1529+
echo
15251530
fi
15261531

15271532
# If USE_SYSTEMD is enabled, tell the user about using it.
15281533
if [[ "$USE_SYSTEMD" == "True" ]]; then
1534+
echo
15291535
echo "Services are running under systemd unit files."
15301536
echo "For more information see: "
15311537
echo "https://docs.openstack.org/developer/devstack/systemd.html"
1538+
echo
15321539
fi
15331540

1541+
# devstack version
1542+
devstack-version
1543+
echo
1544+
15341545
# Indicate how long this took to run (bash maintained variable ``SECONDS``)
15351546
echo_summary "stack.sh completed in $SECONDS seconds."
15361547

1548+
15371549
# Restore/close logging file descriptors
15381550
exec 1>&3
15391551
exec 2>&3

stackrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ REQUIREMENTS_DIR=$DEST/requirements
272272
# Setting the variable to 'ALL' will activate the download for all
273273
# libraries.
274274

275+
DEVSTACK_SERIES="pike"
275276

276277
##############
277278
#

0 commit comments

Comments
 (0)