]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
RPM check_url endpoint variables chacra interactions
authorAlfredo Deza <adeza@redhat.com>
Wed, 20 Apr 2016 14:49:00 +0000 (10:49 -0400)
committerAlfredo Deza <adeza@redhat.com>
Wed, 20 Apr 2016 15:19:57 +0000 (11:19 -0400)
This fixes the issue where the same url would be used to check binary existence
and to POST new binaries causing this:

POST /binaries/ceph/jewel/centos/7/x86_64/librados2-10.2.0-0.el7.x86_64.rpm/source/ HTTP/1.1" 404 None

Which is the wrong URL

Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-build/build/build_rpm

index 9192e6a21b0f86cf8733212f17d479b2053dad8d..3588a006169f42dbbbff8abbe43ce56415019ae7 100644 (file)
@@ -61,11 +61,14 @@ vers=`cat ./dist/version`
 # slap -rc to the ref if we are doing a release-candidate build
 [ "$RC" = true ] && chacra_ref="$BRANCH-rc" || chacra_ref="$BRANCH"
 [ "$TEST" = true ] && chacra_ref="test"
-chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}/${ARCH}/librados2-${vers}-0.${DIST}.${ARCH}.rpm"
+
+chacra_endpoint="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
+chacra_check_url="${chacra_endpoint}/${ARCH}/librados2-${vers}-0.${DIST}.${ARCH}.rpm"
+
 
 if [ "$THROWAWAY" = false ] ; then
     # this exists in scripts/build_utils.sh
-    check_binary_existence $chacra_baseurl
+    check_binary_existence $chacra_check_url
 fi
 
 HOST=$(hostname --short)
@@ -116,6 +119,6 @@ cd "$WORKSPACE"
 
 if [ "$THROWAWAY" = false ] ; then
     # push binaries to chacra
-    find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/source
-    find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_baseurl}/${ARCH}
+    find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source
+    find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}
 fi