X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=prototypes%2Fxci%2Fscripts%2Fupdate-osa-version-files.sh;h=d822d25750e2b2bf882af8c93d9c70a7c762154e;hb=f21b646f8d2045179230c18a301b6e12699d4e80;hp=7df020c1bff61f496f9186e9967df35af9b2aae6;hpb=e858613f52f1d8b9bea04870921395d36055bfe6;p=releng.git diff --git a/prototypes/xci/scripts/update-osa-version-files.sh b/prototypes/xci/scripts/update-osa-version-files.sh index 7df020c1b..d822d2575 100755 --- a/prototypes/xci/scripts/update-osa-version-files.sh +++ b/prototypes/xci/scripts/update-osa-version-files.sh @@ -9,7 +9,8 @@ ############################################################################## # 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 @@ -18,7 +19,7 @@ releng_xci_base="$(dirname $(readlink -f $0))/.." usage() { echo """ - ${0} + ${0} [] """ exit 0 } @@ -32,7 +33,7 @@ printme() { } # 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)" @@ -69,7 +70,13 @@ echo """--- cat $tempdir/openstack-ansible/ansible-role-requirements.yml >> $releng_xci_base/file/ansible-role-requirements.yml # Update the pinned OSA version -sed -i "/^export OPENSTACK_OSA_VERSION/s@:-\"[a-z0-9]*@:-\"${1}@" $releng_xci_base/config/pinned-versions +sed -i -e "/^export OPENSTACK_OSA_VERSION/s@:-\"[a-z0-9]*@:-\"${1}@" \ + -e "s/\(^# HEAD of osa.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions + +# Update the pinned bifrost version +[[ -n ${2:-} ]] && \ + sed -i -e "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" \ + -e "s/\(^# HEAD of bifrost.*of \).*/\1$(date +%d\.%m\.%Y)/" $releng_xci_base/config/pinned-versions popd &> /dev/null