Add additional Docker image build with debug info included. #13359
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
DEBUG_BUILD
, which when set changes the default CFLAGS for the build to include debug info and optimize for debugging (currently, it changes the default from-O2 -pipe
to-Og -ggdb -pipe
).netdata/netdata-debug
. This will match tagging and versioning withnetdata/netdata
.Test Plan
The new build argument can be tested by checkout out the PR branch and running a docker build with
--build-arg DEBUG_BUILD=1
. The resultant image should have full debugging info in the Netdata Agent binary.The split CFLAGS handling can be tested by manually running
packaging/docker/gen-cflags.sh
. IfCFLAGS
is set in the environment, it should print the contents of that variable, otherwise ifDEBUG_BUILD
is set to a non-empty string, it should print-Og -ggdb -pipe
, otherwise it should print-O2 -pipe
.Additional Information
Fixes: #13341