diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2017-04-04 13:42:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-04-04 13:42:50 +0000 |
commit | 85ec79c7b6ac21c0d8e6a2910246c2d5d38ad981 (patch) | |
tree | c55a20982a0d9620fcf0f232f44783f9f33ca41a /jjb/xci/xci-deploy.sh | |
parent | a5a7e0f1f133aa64c62f7f34cb4f972a20b9a6f8 (diff) | |
parent | 2b3566ac47a9a0abf8d4ef54650f2744ab26bdeb (diff) |
Merge "xci: Create periodic osa jobs to find working version"
Diffstat (limited to 'jjb/xci/xci-deploy.sh')
-rwxr-xr-x | jjb/xci/xci-deploy.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/jjb/xci/xci-deploy.sh b/jjb/xci/xci-deploy.sh index cf5fe32d3..33457b9f0 100755 --- a/jjb/xci/xci-deploy.sh +++ b/jjb/xci/xci-deploy.sh @@ -26,6 +26,48 @@ elif [[ "$JOB_NAME" =~ "periodic" ]]; then echo "Info: Using $OPNFV_RELENG_VERSION" fi +# 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 [[ "$JOB_NAME" =~ "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 + # proceed with the deployment cd $WORKSPACE/prototypes/xci sudo -E ./xci-deploy.sh + +# if we arrived here without failing, it means we have something we can pin +# this is again here to show the intention +cd $WORKSPACE/openstack-ansible +OSA_GIT_SHA1=$(git rev-parse HEAD) + +# log some info +echo -e "\n" +echo "***********************************************************************" +echo "* OSA SHA1 TO PIN *" +echo "* *" +echo " $OSA_GIT_SHA1" +echo "* *" +echo "***********************************************************************" + +echo -e "\n" |