X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=ci%2Fapex_build.sh;h=abeac7f9f3fcd1e8ff19ebcde0a874df5d040222;hb=4038e157f640ad185d5469c146c8f0faf23dd3ec;hp=5b8184076c3b986210806210e4b9fd3021eff492;hpb=0666e6b9c92cdba1d90c951423e5ef1fb2736c48;p=kvmfornfv.git diff --git a/ci/apex_build.sh b/ci/apex_build.sh index 5b8184076..abeac7f9f 100755 --- a/ci/apex_build.sh +++ b/ci/apex_build.sh @@ -5,13 +5,18 @@ build_dir=/opt/kvmfornfv/ mkdir -p /tmp/kvmfornfv SRC=/tmp/kvmfornfv source ${build_dir}/ci/apex.conf +#Cloning into /tmp/kvmfornfv cd $SRC -#Cloning into /tmp/kvmfornfv from local repository -git clone $build_dir $SRC -if [ "$branch" == "master" ] || [ "$branch" == "danube" ];then - echo "Checking out on $branch branch" +if [[ "$branch" == "master" ]] || [[ "$branch" == *"danube"* ]];then + echo "Cloning the repository of $branch given" + git clone -b $branch https://gerrit.opnfv.org/gerrit/kvmfornfv.git /tmp/kvmfornfv + git branch echo "Commit-id is ${commit_id}" git checkout -f ${commit_id} + if [ $? -ne 0 ];then + echo "Please check the commit-id provided in apex.conf" + exit 1 + fi fi mkdir ${output_dir} }