From: Ali Maredia Date: Fri, 17 Mar 2017 16:33:24 +0000 (-0400) Subject: nfs-ganesha: add flavor to chacra endpoints X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bd1c51133380e1287e66a79d6390acd15b488fd6;p=ceph-build.git nfs-ganesha: add flavor to chacra endpoints Signed-off-by: Ali Maredia --- diff --git a/nfs-ganesha/build/build_deb b/nfs-ganesha/build/build_deb index 05c8136b..0f6f1952 100644 --- a/nfs-ganesha/build/build_deb +++ b/nfs-ganesha/build/build_deb @@ -118,8 +118,9 @@ sudo pbuilder build \ $WORKSPACE/nfs-ganesha_${VERSION}-1${DIST}.dsc -## Upload the created RPMs to chacra -chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${DIST}/flavors/${FLAVOR}" +## Upload the created debs to chacra +chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${DIST}" +chacra_repo_endpoint="${chacra_endpoint}/flavors/${FLAVOR}" [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags="" @@ -127,7 +128,7 @@ chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${DIS if [ "$THROWAWAY" = false ] ; then # push binaries to chacra - find $WORKSPACE/dist/deb | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH} + find $WORKSPACE/dist/deb | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR} # write json file with build info # version and package_manager version are needed for teuthology cat > $WORKSPACE/repo-extra.json << EOF @@ -141,12 +142,12 @@ if [ "$THROWAWAY" = false ] ; then } EOF # post the json to repo-extra json to chacra - curl -X POST -H "Content-Type:application/json" --data "@$WORKSPACE/repo-extra.json" -u $CHACRACTL_USER:$CHACRACTL_KEY ${chacra_url}/repos/${chacra_endpoint}/extra/ + curl -X POST -H "Content-Type:application/json" --data "@$WORKSPACE/repo-extra.json" -u $CHACRACTL_USER:$CHACRACTL_KEY ${chacra_url}repos/${chacra_repo_endpoint}/extra/ # start repo creation - $VENV/chacractl repo update ${chacra_endpoint} + $VENV/chacractl repo update ${chacra_repo_endpoint} fi -echo "Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_endpoint}" +echo "Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_repo_endpoint}" # update shaman with the completed build status SHA1=${GIT_COMMIT} diff --git a/nfs-ganesha/build/build_rpm b/nfs-ganesha/build/build_rpm index f19a1537..1a245087 100644 --- a/nfs-ganesha/build/build_rpm +++ b/nfs-ganesha/build/build_rpm @@ -93,7 +93,8 @@ echo "Building RPMs" sudo mock --verbose -r nfs-ganesha.cfg --define "dist .el7" --resultdir=$WORKSPACE/dist/RPMS/ ${SRPM} || ( tail -n +1 $WORKSPACE/dist/RPMS/{root,build}.log && exit 1 ) VERSION=`grep -om 1 '[[:digit:]]\+\.[[:digit:]]\+-dev-[[:digit:]]\+' $WORKSPACE/nfs-ganesha/build/include/config.h` -chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}/flavors/${FLAVOR}" +chacra_endpoint="nfs-ganesha/${NFS_GANESHA_BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}" +chacra_repo_endpoint="${chacra_endpoint}/flavors/${FLAVOR}" RPM_RELEASE=`grep Release $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec | sed 's/Release:[ \t]*//g' | cut -d '%' -f 1` RPM_VERSION=`grep Version $WORKSPACE/nfs-ganesha/src/nfs-ganesha.spec | sed 's/Version:[ \t]*//g'` PACKAGE_MANAGER_VERSION="$RPM_VERSION-$RPM_RELEASE" @@ -102,8 +103,8 @@ PACKAGE_MANAGER_VERSION="$RPM_VERSION-$RPM_RELEASE" if [ "$THROWAWAY" = false ] ; then # push binaries to chacra - find $WORKSPACE/dist/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source - find $WORKSPACE/dist/RPMS/ | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH} + find $WORKSPACE/dist/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source/flavors/${FLAVOR} + find $WORKSPACE/dist/RPMS/ | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR} # write json file with build info # version and package_manager version are needed for teuthology cat > $WORKSPACE/repo-extra.json << EOF @@ -117,12 +118,12 @@ if [ "$THROWAWAY" = false ] ; then } EOF # post the json to repo-extra json to chacra - curl -X POST -H "Content-Type:application/json" --data "@$WORKSPACE/repo-extra.json" -u $CHACRACTL_USER:$CHACRACTL_KEY ${chacra_url}/repos/${chacra_endpoint}/extra/ + curl -X POST -H "Content-Type:application/json" --data "@$WORKSPACE/repo-extra.json" -u $CHACRACTL_USER:$CHACRACTL_KEY ${chacra_url}repos/${chacra_repo_endpoint}/extra/ # start repo creation - $VENV/chacractl repo update ${chacra_endpoint} + $VENV/chacractl repo update ${chacra_repo_endpoint} fi -echo "Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_endpoint}" +echo "Check the status of the repo at: https://shaman.ceph.com/api/repos/${chacra_repo_endpoint} # update shaman with the completed build status SHA1=${GIT_COMMIT}