From: Victor Morales Date: Thu, 5 Apr 2018 14:06:05 +0000 (-0700) Subject: Export OPENSTACK_REQUIREMENTS_VERSION X-Git-Tag: 6.0.0~30^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=b9f6aec722aa14c1052b4b66a33f23ebc4bae92c;p=releng-xci.git Export OPENSTACK_REQUIREMENTS_VERSION The hash value for the OpenStack requirements project is consumed for other projects which can be out of the openstack-ansible scope. This change creates the OPENSTACK_REQUIREMENTS_VERSION variable using the openstack_services.yml value as default one. Change-Id: I4544bcc3f14c107aab8ebba1dced1ba203f07f68 Signed-off-by: Victor Morales --- diff --git a/xci/config/env-vars b/xci/config/env-vars index f72a0240..185778cf 100755 --- a/xci/config/env-vars +++ b/xci/config/env-vars @@ -43,3 +43,5 @@ export XCI_SSL_SUBJECT=${XCI_SSL_SUBJECT:-"/C=US/ST=California/L=San Francisco/O export DEPLOY_SCENARIO=${DEPLOY_SCENARIO:-"os-nosdn-nofeature"} # Kubespray requires that ansible version is 2.4.0.0 export XCI_KUBE_ANSIBLE_PIP_VERSION=2.4.0.0 +# OpenStack global requirements version +export OPENSTACK_REQUIREMENTS_VERSION=${OPENSTACK_REQUIREMENTS_VERSION:-$(awk '/requirements_git_install_branch:/ {print $2}' ${XCI_PATH}/xci/installer/osa/files/openstack_services.yml)} diff --git a/xci/files/install-lib.sh b/xci/files/install-lib.sh index 92d1f065..6acaf885 100644 --- a/xci/files/install-lib.sh +++ b/xci/files/install-lib.sh @@ -15,8 +15,7 @@ function install_ansible() { set -eu # Use the upper-constraints file from the pinned requirements repository. - local requirements_sha=$(awk '/requirements_git_install_branch:/ {print $2}' ${XCI_PATH}/xci/installer/osa/files/openstack_services.yml) - local uc="https://raw.githubusercontent.com/openstack/requirements/${requirements_sha}/upper-constraints.txt" + local uc="https://raw.githubusercontent.com/openstack/requirements/${OPENSTACK_REQUIREMENTS_VERSION}/upper-constraints.txt" local install_map declare -A PKG_MAP @@ -144,8 +143,7 @@ function install_ansible() { ansible_lint() { set -eu # Use the upper-constraints file from the pinned requirements repository. - local requirements_sha=$(awk '/requirements_git_install_branch:/ {print $2}' ${XCI_PATH}/xci/installer/osa/files/openstack_services.yml) - local uc="https://raw.githubusercontent.com/openstack/requirements/${requirements_sha}/upper-constraints.txt" + local uc="https://raw.githubusercontent.com/openstack/requirements/${OPENSTACK_REQUIREMENTS_VERSION}/upper-constraints.txt" local playbooks_dir=(xci/playbooks xci/installer/osa/playbooks xci/installer/kubespray/playbooks) # Extract role from scenario information local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)