From: Boris Ranto Date: Mon, 12 Dec 2016 15:06:50 +0000 (+0100) Subject: samba: send extra information X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad6210fbb231e7cda6b86fefd94cd677799bec9d;p=ceph-build.git samba: send extra information Signed-off-by: Boris Ranto --- diff --git a/samba/build/build_deb b/samba/build/build_deb index c95629a3..62519c37 100644 --- a/samba/build/build_deb +++ b/samba/build/build_deb @@ -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} diff --git a/samba/build/build_rpm b/samba/build/build_rpm index 44e1c73b..780a8945 100644 --- a/samba/build/build_rpm +++ b/samba/build/build_rpm @@ -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}