)
bwc_cmd_sccache_flags = "--env-file=${env.WORKSPACE}/.env";
}
+ switch (env.FLAVOR) {
+ case "default":
+ env.CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc"
+ env.CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
+ break
+ case "crimson":
+ env.DEB_BUILD_PROFILES="pkg.ceph.crimson"
+ sh '''#!/bin/bash
+ echo "WITH_CRIMSON=true" >> .env
+ '''
+ break
+ default:
+ println "FLAVOR=${env.FLAVOR} is invalid"
+ assert false
+ }
bwc_command = "${bwc_command} ${bwc_cmd_sccache_flags}"
if ( os.pkg_type == "deb" ) {
def sccache_flag = "-DWITH_SCCACHE=ON"
if ( env.SCCACHE == "true" && ! env.CEPH_EXTRA_CMAKE_ARGS.contains(sccache_flag) ) {
env.CEPH_EXTRA_CMAKE_ARGS = "${env.CEPH_EXTRA_CMAKE_ARGS} ${sccache_flag}"
}
+ sh '''#!/bin/bash
+ echo "DEB_BUILD_PROFILES${DEB_BUILD_PROFILES}" >> .env
+ '''
bwc_command = "${bwc_command} -e debs"
} else if ( env.DIST =~ /^(centos|rhel|fedora).*/ ) {
def rpmbuild_args = ""
if ( env.SCCACHE == "true" ) rpmbuild_args += " -R--with=sccache"
if ( env.DWZ == "false" ) rpmbuild_args += " -R--without=dwz"
+ if ( env.FLAVOR == "default" ) rpmbuild_args += " -R--with=tcmalloc"
+ if ( env.FLAVOR == "crimson" ) rpmbuild_args += " -R--with=crimson"
bwc_command = "${bwc_command}${rpmbuild_args} -e rpm"
} else if ( env.DIST =~ /suse|sles/ ) {
throw new Exception("bwc not implemented for ${env.DIST}")
} else {
throw new Exception("DIST '${env.DIST}' is invalid!")
}
+ sh '''#!/bin/bash
+ echo "CEPH_EXTRA_CMAKE_ARGS=${CEPH_EXTRA_CMAKE_ARGS}" >> .env
+ '''
sh """#!/bin/bash -ex
cd dist/ceph
ln ../ceph-${env.VERSION}.tar.bz2 .
script {
sh """
if [ -f "${env.WORKSPACE}/dist/ceph/sccache_log.txt" ]; then
- ln dist/ceph/sccache_log.txt sccache_log_${env.DIST}_${env.ARCH}.txt
+ ln dist/ceph/sccache_log.txt sccache_log_${env.DIST}_${env.ARCH}_${env.FLAVOR}.txt
fi
"""
archiveArtifacts(