Currently, the only flavor used for testing is "default".
While this ensures that the tested flavor matches the released flavor, it can also be a limitation.
Introducing a debug flavor would allow us to test branches that require additional or more thorough validation.
The main difference is that built-in assertions would be compiled in.
The reasons for this change are:
a) The Crimson suite uses a crimson-debug flavor for project PR gating.
The next commit will clean up the Crimson flavor entirely,
and the new debug flavor introduced here could be used as its replacement.
b) Good practice: having an additional build with debug enabled is useful
when retesting or performing extra checks.
Initially, the new debug flavor will only apply to centos9 builds.
If it proves valuable, we can expand support to other distros.
Note: The current way to schedule debug builds is by using a *-debug branch name.
Having a dedicated flavor seems more straightforward.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
# build tentacle on:
# default: noble jammy centos9 windows
# crimson: centos9
+ # debug: centos9
- conditional-step:
condition-kind: regex-match
regex: .*tentacle.*
DISTROS=centos9
FLAVOR=crimson-debug
ARCHS=x86_64
+ - project: 'ceph-dev'
+ predefined-parameters: |
+ BRANCH=${{GIT_BRANCH}}
+ FORCE=True
+ DISTROS=centos9
+ FLAVOR=debug
+ ARCHS=x86_64
# build main on:
# default: noble jammy centos9 windows
# crimson-debug: centos9
# crimson-release: centos9
+ # debug: centos9
- conditional-step:
condition-kind: regex-match
regex: .*main.*
DISTROS=centos9
FLAVOR=crimson-release
ARCHS=x86_64
+ - project: 'ceph-dev'
+ predefined-parameters: |
+ BRANCH=${{GIT_BRANCH}}
+ FORCE=True
+ DISTROS=centos9
+ FLAVOR=debug
+ ARCHS=x86_64
wrappers:
- inject-passwords:
# build tentacle on:
# default: noble jammy centos9 windows
# crimson: centos9
+ # debug: centos9
- conditional-step:
condition-kind: regex-match
regex: .*tentacle.*
DISTROS=centos9
FLAVOR=crimson-debug
ARCHS=x86_64
+ - project: 'ceph-dev-new'
+ predefined-parameters: |
+ BRANCH=${{GIT_BRANCH}}
+ FORCE=True
+ DISTROS=centos9
+ FLAVOR=debug
+ ARCHS=x86_64
# If no release name is found in branch, build on all possible distro/flavor combos (except xenial, bionic, focal).
# regex matching and 'on-evaluation-failure: run' doesn't work here so triple negative it is.
- conditional-step:
DISTROS=centos9
FLAVOR=crimson-debug
ARCHS=x86_64
- # build only centos9, no crimson
+ - trigger-builds:
+ - project: 'ceph-dev-new'
+ predefined-parameters: |
+ BRANCH=${{GIT_BRANCH}}
+ FORCE=True
+ DISTROS=centos9
+ FLAVOR=debug
+ ARCHS=x86_64
+ # build only centos9, default and debug. no crimson
- conditional-step:
condition-kind: regex-match
regex: .*centos9-only.*
FORCE=True
DISTROS=centos9
ARCHS=x86_64
+ - trigger-builds:
+ - project: 'ceph-dev-new'
+ predefined-parameters: |
+ BRANCH=${{GIT_BRANCH}}
+ FORCE=True
+ DISTROS=centos9
+ FLAVOR=debug
+ ARCHS=x86_64
# Build only the `crimson` flavour, don't waste resources on the default one.
# Useful for the crimson's bug-hunt at Sepia
# crimson-debug: centos9
name: FLAVOR
choices:
- default
+ - debug
- crimson-debug
- crimson-release
default: "default"
- description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'"
+ description: "Type of Ceph build, choices are: crimson-debug, crimson-release, debug, default. Defaults to: 'default'"
- string:
name: CI_CONTAINER
}
axes {
name 'FLAVOR'
- values 'default', 'crimson-release', 'crimson-debug'
+ values 'default', 'crimson-release', 'crimson-debug', 'debug'
}
}
// crimson is only supported on centos9 x86_64
+ // debug flavor is currently only supported on centos9 x86_64
excludes {
exclude {
axis {
name 'FLAVOR'
- values 'crimson-release', 'crimson-debug'
+ values 'crimson-release', 'crimson-debug', 'debug'
}
axis {
name 'DIST'
exclude {
axis {
name 'FLAVOR'
- values 'crimson-release', 'crimson-debug'
+ values 'crimson-release', 'crimson-debug', 'debug'
}
axis {
name 'ARCH'
ceph_extra_cmake_args += " -DWITH_STATIC_LIBSTDCXX=ON"
}
break
+ case "debug":
+ ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug"
+ break
case "crimson-debug":
deb_build_profiles = "pkg.ceph.crimson"
ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug"
- string:
name: FLAVORS
- description: "A list of flavors to build. Available options are: default, crimson-release, crimson-debug"
+ description: "A list of flavors to build. Available options are: default, crimson-release, crimson-debug, debug"
default: "default"
- bool:
- default
- crimson-debug
- crimson-release
+ - debug
default: "default"
- description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'"
+ description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default, debug. Defaults to: 'default'"
- bool:
name: CI_CONTAINER
name: FLAVOR
choices:
- default
+ - debug
- crimson-debug
- crimson-release
default: "default"
- description: "Type of Ceph build, choices are: crimson-debug, crimson-release, default. Defaults to: 'default'"
+ description: "Type of Ceph build, choices are: crimson-debug, crimson-release, debug, default. Defaults to: 'default'"
- bool:
name: CI_CONTAINER
|CEPH-BUILD-JOB|Which Jenkins job to trigger. Only ceph-dev-pipeline supports the options below.|ceph-dev-pipeline, ceph-dev-new|`ceph-dev-pipeline`|
|DISTROS|Space-sparated list of Linux distributions to build for|focal, jammy, noble, centos9, windows|Depends on keywords in branch name|
|ARCHS|Space-separated list of architectures to build on|x86_64, arm64|`x86_64 arm64`|
-|FLAVORS|Crimson or non-Crimson|default, crimson-debug, crimson-release|`default`|
+|FLAVORS|Crimson or non-Crimson or debug|default, debug, crimson-debug, crimson-release|`default`|
|CI-COMPILE|Compile binaries and packages[^1]|Boolean|`true`|
|CI-CONTAINER|Build a dev container using the packages built|Boolean|`true`|
|DWZ|Use [DWZ](https://sourceware.org/dwz/) to make debuginfo packages smaller|Boolean|`true` when using ceph-dev-new<br>`false` when using ceph-dev-pipeline[^2]|
params << params[0].clone()
params[-1]['ARCHS'] = 'x86_64'
params[-1]['DISTROS'] = 'centos9'
- params[-1]['FLAVOR'] = 'crimson-debug'
+ params[-1]['FLAVOR'] = 'crimson-debug debug'
} else {
params[0]['ARCHS'] += ' arm64'
params[0]['FLAVOR'] += ' crimson-debug'
+ params[1]['FLAVOR'] += ' debug'
}
break
case ~/.*centos9-only.*/:
params[0]['DISTROS'] = 'centos9'
- break
+ if ( !singleSet ) {
+ params << params[0].clone()
+ params[0]['FLAVOR'] = 'debug'
+ } else {
+ params[0]['FLAVOR'] += ' debug'
+ }
case ~/.*crimson-only.*/:
params[0]['ARCHS'] = 'x86_64'
params[0]['DISTROS'] = 'centos9'
params << params[0].clone()
params[-1]['ARCHS'] = 'x86_64'
params[-1]['DISTROS'] = 'centos9'
- params[-1]['FLAVOR'] = 'crimson-debug'
+ params[-1]['FLAVOR'] = 'crimson-debug debug'
} else {
params[0]['FLAVOR'] += ' crimson-debug'
+ params[1]['FLAVOR'] += ' debug'
}
}
if ( singleSet ) {
CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON"
DEB_BUILD_PROFILES=""
;;
+ debug)
+ CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug"
+ ;;
crimson-debug)
CEPH_EXTRA_RPMBUILD_ARGS="--with crimson"
DEB_BUILD_PROFILES="pkg.ceph.crimson"