From caf114d6802cf8af708d5caa7ea7e0333d0f1bfd Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Thu, 29 Jun 2017 09:46:32 +0100 Subject: prototypes: xci: update-osa-version-files: Add support for updating bifrost SHAs Add a second optional argument to update the bifrost SHA instead of doing this bit manually. Change-Id: I0fab8745ae08ad4f54a2a1f5b0b7a64fde4b8295 Signed-off-by: Markos Chandras --- prototypes/xci/config/pinned-versions | 2 +- prototypes/xci/scripts/update-osa-version-files.sh | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/prototypes/xci/config/pinned-versions b/prototypes/xci/config/pinned-versions index de222fd92..40f73bd01 100755 --- a/prototypes/xci/config/pinned-versions +++ b/prototypes/xci/config/pinned-versions @@ -23,5 +23,5 @@ export OPNFV_RELENG_VERSION="master" # HEAD of "master" as of 29.06.2017 export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"7c9bb5e07c6bc3b42c9a9e8457e5eef511075b38"} -# HEAD of "master" as of 04.04.2017 +# HEAD of "master" as of 29.06.2017 export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"0648818c64239b534d00db381c4609f28e40bda9"} diff --git a/prototypes/xci/scripts/update-osa-version-files.sh b/prototypes/xci/scripts/update-osa-version-files.sh index 7df020c1b..7eed4b7d4 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)" @@ -71,6 +72,10 @@ cat $tempdir/openstack-ansible/ansible-role-requirements.yml >> $releng_xci_base # 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 "" -- cgit 1.2.3-korg From 791c723db42bf7e011d04ca5fb2a9f0e019700b4 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 3 Jul 2017 09:37:17 +0100 Subject: prototypes: xci: scripts: Update SHA dates Update the dates in the pinned-versions file whenever we update the SHAs. Change-Id: I23ebd90a3fc688a7501fcb2d32217357f8c31657 Signed-off-by: Markos Chandras --- prototypes/xci/config/pinned-versions | 4 ++-- prototypes/xci/scripts/update-osa-version-files.sh | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/prototypes/xci/config/pinned-versions b/prototypes/xci/config/pinned-versions index 40f73bd01..581786075 100755 --- a/prototypes/xci/config/pinned-versions +++ b/prototypes/xci/config/pinned-versions @@ -21,7 +21,7 @@ #------------------------------------------------------------------------------- # use releng from master until the development work with the sandbox is complete export OPNFV_RELENG_VERSION="master" -# HEAD of "master" as of 29.06.2017 +# HEAD of bifrost "master" as of 29.06.2017 export OPENSTACK_BIFROST_VERSION=${OPENSTACK_BIFROST_VERSION:-"7c9bb5e07c6bc3b42c9a9e8457e5eef511075b38"} -# HEAD of "master" as of 29.06.2017 +# HEAD of osa "master" as of 29.06.2017 export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"0648818c64239b534d00db381c4609f28e40bda9"} diff --git a/prototypes/xci/scripts/update-osa-version-files.sh b/prototypes/xci/scripts/update-osa-version-files.sh index 7eed4b7d4..d822d2575 100755 --- a/prototypes/xci/scripts/update-osa-version-files.sh +++ b/prototypes/xci/scripts/update-osa-version-files.sh @@ -70,11 +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 "/^export OPENSTACK_BIFROST_VERSION/s@:-\"[a-z0-9]*@:-\"${2}@" $releng_xci_base/config/pinned-versions + 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 -- cgit 1.2.3-korg