]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build: post 'extra' repo information to chacra for deb repos
authorAndrew Schoen <aschoen@redhat.com>
Tue, 18 Oct 2016 17:47:30 +0000 (12:47 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 18 Oct 2016 17:47:30 +0000 (12:47 -0500)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build/build/build_deb

index f98034ad814ca56be21d5d5edb780794f8a591b2..ca987ca918e5ae0b022296eaa65774a44cfbadde 100644 (file)
@@ -181,6 +181,19 @@ echo lintian --allow-root $releasedir/$cephver/*$bpvers*.deb
 if [ "$THROWAWAY" = false ] ; then
     # push binaries to chacra
     find release/$vers/ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+    # write json file with build info
+    cat > $WORKSPACE/repo-extra.json << EOF
+{
+    "version":"$vers",
+    "package_manager_version":"$bpvers",
+    "build_url":"$BUILD_URL",
+    "root_build_cause":"$ROOT_BUILD_CAUSE",
+    "node_name":"$NODE_NAME",
+    "job_name":"$JOB_NAME"
+}
+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 https://chacra.ceph.com/repos/${chacra_repo_endpoint}/extra/
     # start repo creation
     $VENV/chacractl repo update ${chacra_repo_endpoint}
 fi