]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
samba: send extra information 590/head
authorBoris Ranto <branto@redhat.com>
Mon, 12 Dec 2016 15:06:50 +0000 (16:06 +0100)
committerBoris Ranto <branto@redhat.com>
Mon, 12 Dec 2016 22:00:42 +0000 (23:00 +0100)
Signed-off-by: Boris Ranto <branto@redhat.com>
samba/build/build_deb
samba/build/build_rpm

index c95629a38bc64d0c9a2ffc75e368db4716ec6f7d..62519c37c63550f1b8bd222466faed4bd408e031 100644 (file)
@@ -50,6 +50,21 @@ chacra_endpoint="samba/${BRANCH}/${GIT_COMMIT}/${DISTRO}/${DIST}"
 
 # push binaries to chacra
 find *.deb | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${DEB_ARCH}/
+PACKAGE_MANAGER_VERSION=$(dpkg-deb -f $(find *"$DEB_ARCH".deb | head -1) Version)
+
+# write json file with build info
+cat > $WORKSPACE/repo-extra.json << EOF
+{
+    "version":"$VERSION",
+    "package_manager_version":"$PACKAGE_MANAGER_VERSION",
+    "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 ${chacra_url}repos/${chacra_endpoint}/extra/
 
 # start repo creation
 $VENV/chacractl repo update ${chacra_endpoint}
index 44e1c73b01738cafc23493cbf1d8e3d64cdd275f..780a8945ca2636df7a6b2d410dedbe65ab757308 100644 (file)
@@ -50,6 +50,21 @@ chacra_endpoint="samba/${BRANCH}/${GIT_COMMIT}/${DISTRO}/${RELEASE}"
 
 # push binaries to chacra
 find *.rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/
+PACKAGE_MANAGER_VERSION=$(rpm --queryformat '%{VERSION}-%{RELEASE}\n' -qp $(find *.rpm | egrep "\.$ARCH\.rpm" | head -1))
+
+# write json file with build info
+cat > $WORKSPACE/repo-extra.json << EOF
+{
+    "version":"$VERSION",
+    "package_manager_version":"$PACKAGE_MANAGER_VERSION",
+    "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 ${chacra_url}repos/${chacra_endpoint}/extra/
 
 # start repo creation
 $VENV/chacractl repo update ${chacra_endpoint}