]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
build_utils: export jaeger build args if FLAVOR == jaeger
authorDeepika Upadhyay <dupadhya@redhat.com>
Thu, 1 Jul 2021 17:32:34 +0000 (23:02 +0530)
committerDeepika Upadhyay <dupadhya@redhat.com>
Fri, 9 Jul 2021 15:43:29 +0000 (21:13 +0530)
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
ceph-dev-new/config/definitions/ceph-dev-new.yml
ceph-dev-setup/build/build
scripts/build_utils.sh

index 35ca8698b7f611433d5abb9a0c9bedd2ec53d6fc..f1ddaad6df6a4fc53c481ec9e4ad3d33c97e4409 100644 (file)
@@ -56,8 +56,9 @@ If this is checked, then the binaries will be built and pushed to chacra even if
           choices:
             - default
             - crimson
+            - jaeger
           default: "default"
-          description: "Type of Ceph build, choices are: crimson, default. Defaults to: 'default'"
+          description: "Type of Ceph build, choices are: crimson, jaeger, default. Defaults to: 'default'"
 
       - string:
           name: CI_CONTAINER
index ed60f7961abfa8bca0ab23cb031154d133260501..d3ac7ad4e98364565a4506051fc93366948fd3e7 100644 (file)
@@ -36,6 +36,7 @@ rm -rf release
 echo "Running submodule update ..."
 git submodule update --init
 
+# export args for building optional packages
 ceph_build_args_from_flavor ${FLAVOR}
 
 # When using autotools/autoconf it is possible to see output from `git diff`
index 0c1372fcde9cec18d8d678fc0c001b69fffe0b5c..173bd9bfee8e706bfa81961c38f1a02c9ef6f074 100644 (file)
@@ -840,6 +840,7 @@ gen_debian_version() {
 # Flavor Builds support
 # - CEPH_EXTRA_RPMBUILD_ARGS is consumed by build_rpms()
 # - CEPH_EXTRA_CMAKE_ARGS is consumed by debian/rules and ceph.spec directly
+# - PROFILES is consumed by pbuilder
 ceph_build_args_from_flavor() {
     local flavor=$1
     shift
@@ -855,6 +856,10 @@ ceph_build_args_from_flavor() {
         CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug"
         CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SEASTAR=ON"
         ;;
+    jaeger)
+        CEPH_EXTRA_RPMBUILD_ARGS="--with jaeger"
+        PROFILES="pkg.ceph.jaeger"
+        ;;
     *)
         echo "unknown FLAVOR: ${FLAVOR}" >&2
         exit 1
@@ -909,6 +914,7 @@ build_debs() {
 
     CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS $(extra_cmake_args)"
     DEB_BUILD_OPTIONS="parallel=$(get_nr_build_jobs)"
+    PROFILES="nocheck,$PROFILES"
 
     # pass only those env vars specifically noted
     sudo \
@@ -918,7 +924,7 @@ build_debs() {
         --distribution $DIST \
         --basetgz $pbuilddir/$DIST.tgz \
         --buildresult $releasedir/$cephver \
-        --profiles nocheck \
+        --profiles $PROFILES \
         --use-network yes \
         $releasedir/$cephver/ceph_$bpvers.dsc
 
@@ -1392,10 +1398,15 @@ setup_rpm_build_deps() {
 
     sed -e 's/@//g' < ceph.spec.in > $DIR/ceph.spec
 
-    if [ "$FLAVOR" = "crimson" ]; then
-        # enable more build depends required by crimson
-        sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $DIR/ceph.spec
-    fi
+    # enable more build depends required by build flavor(jaeger, crimson)
+    case "${FLAVOR}" in
+    crimson)
+      sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $DIR/ceph.spec
+        ;;
+    jaeger)
+      sed -i -e 's/%bcond_with jaeger/%bcond_without jaeger/g' $DIR/ceph.spec
+        ;;
+    esac
 
     # Make sure we have all the rpm macros installed and at the latest version
     # before installing the dependencies, python3-devel requires the