]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
nfs-ganesha: add flavor to chacra endpoints 666/head
authorAli Maredia <amaredia@redhat.com>
Fri, 17 Mar 2017 16:33:24 +0000 (12:33 -0400)
committerAli Maredia <amaredia@redhat.com>
Tue, 21 Mar 2017 20:03:54 +0000 (16:03 -0400)
Signed-off-by: Ali Maredia <amaredia@redhat.com>
nfs-ganesha/build/build_deb
nfs-ganesha/build/build_rpm

index 05c8136b38cec557901d4d4d5e4d2f22f758b8d6..0f6f1952259092d7e0480ee1b14c5c7f8f94e078 100644 (file)
@@ -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}
index f19a1537498aaf26a8d194e62bfba188e91dfcab..1a24508737669178f0c48c9b85bf6affa49b7fbb 100644 (file)
@@ -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}