+# this is just an example to give the idea about what we need to do
+# so ignore this part for the timebeing as we need to adjust xci-deploy.sh
+# to take this into account while deploying anyways
+# clone openstack-ansible
+# stable/ocata already use pinned versions so this is only valid for master
+if [[ "$XCI_LOOP" == "periodic" && "$OPENSTACK_OSA_VERSION" == "master" ]]; then
+ cd $WORKSPACE
+ # get the url to openstack-ansible git
+ source ./config/env-vars
+ echo "Info: Capture the ansible role requirement versions before doing anything"
+ git clone -q $OPENSTACK_OSA_GIT_URL
+ cd openstack-ansible
+ cat ansible-role-requirements.yml | while IFS= read -r line
+ do
+ if [[ $line =~ "src:" ]]; then
+ repo_url=$(echo $line | awk {'print $2'})
+ repo_sha1=$(git ls-remote $repo_url $OPENSTACK_OSA_VERSION | awk {'print $1'})
+ fi
+ echo "$line" | sed -e "s|master|$repo_sha1|" >> opnfv-ansible-role-requirements.yml
+ done
+ echo "Info: SHA1s of ansible role requirements"
+ echo "-------------------------------------------------------------------------"
+ cat opnfv-ansible-role-requirements.yml
+ echo "-------------------------------------------------------------------------"
+fi