]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
kernel: repo-extra json with kernelrelease 542/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 15 Nov 2016 14:02:38 +0000 (15:02 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 15 Nov 2016 17:18:32 +0000 (18:18 +0100)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
kernel/build/build_deb
kernel/build/build_rpm
kernel/build/prepare_config

index b30281e862cc69ccefbd98945487edc081ed3d68..0d24b955c9a952d2cface6e9bbc9ec68a433a160 100644 (file)
@@ -99,6 +99,19 @@ if [ "$THROWAWAY" = false ] ; then
     # push binaries to chacra
     find ../*.deb | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/
 
+    # write json file with build info
+    cat > $WORKSPACE/repo-extra.json << EOF
+{
+    "version":"$kernelrelease",
+    "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_endpoint}/extra/
+
     # start repo creation
     $VENV/chacractl repo update ${chacra_endpoint}
 
index c502b3f5ac1eb294ce2278fdeb1db12639d5752a..0badf1a5f0e5b3195c1b1130553c911c2ff5b1f3 100644 (file)
@@ -84,6 +84,19 @@ if [ "$THROWAWAY" = false ] ; then
     # push binaries to chacra
     find ~/rpmbuild/ | egrep '\.rpm$' | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/
 
+    # write json file with build info
+    cat > $WORKSPACE/repo-extra.json << EOF
+{
+    "version":"$kernelrelease",
+    "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_endpoint}/extra/
+
     # start repo creation
     $VENV/chacractl repo update ${chacra_endpoint}
 
index d9ad7e221ee0d160af7e07612ab7545b29079089..a91f09860c558ac6fa61c71515a304f8f96e09df 100644 (file)
@@ -16,3 +16,5 @@ if ! grep -q "^CONFIG_LOCALVERSION_AUTO=y" .config; then
     exit 1
 fi
 printf -- '-ceph-g%s' ${GIT_COMMIT:0:12} > .scmversion
+
+kernelrelease=$(make -s kernelrelease)