4 build_dir=$workspace/stor4nfv
5 ceph_src_dir=$build_dir/src/ceph
13 function ceph_build_validate {
15 if [[ -z "$@" ]]; then
16 echo "usage: ${0} output_dir pkgtype"
21 if [ ! -d ${output_dir} -o ! -w ${output_dir} ] ; then
22 echo "${0}: Output directory '${output_dir}' does not exist or cannot be written"
25 if [ ! -d ${ceph_src_dir} ] ; then
26 echo "${0}: Directory '${ceph_src_dir}' does not exist, run this script from the root of stor4nfv source tree"
36 # TODO: use code inside stor4nfv
38 git clone https://github.com/ceph/ceph.git
40 git reset --hard v12.2.2
41 git submodule update --init --recursive
48 show_stage "ceph rpm build"
54 if [ ${?} -ne 0 ] ; then
55 echo "${0}: ceph build failed"
60 if [ $pkgtype == "centos" ];then
62 elif [ $pkgtype == "ubuntu" ];then
64 latest_ceph_build=`ls -rt $workspace | tail -1`
65 cp $workspace/$latest_ceph_build $build_dir/build_output