##############################################################################
# This script is used to pin the SHAs for the various roles in the
-# ansible-role-requirements file
+# ansible-role-requirements file. It will also update the SHAs for
+# OSA and bifrost.
set -e
usage() {
echo """
- ${0} <openstack-ansible commit SHA>
+ ${0} <openstack-ansible commit SHA> [<bifrost commit SHA>]
"""
exit 0
}
}
# Only need a single argument
-[[ $# -ne 1 ]] && echo "Invalid number of arguments!" && usage
+[[ $# -lt 1 || $# -gt 2 ]] && echo "Invalid number of arguments!" && usage
tempdir="$(mktemp -d)"
# Update the pinned OSA version
sed -i "/^export OPENSTACK_OSA_VERSION/s@:-\"[a-z0-9]*@:-\"${1}@" $releng_xci_base/config/pinned-versions
+# Update the pinned bifrost version
+[[ -n ${2:-} ]] && \
+ sed -i "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" $releng_xci_base/config/pinned-versions
+
popd &> /dev/null
printme ""