Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional Docker image build with debug info included. #13359

Merged
merged 3 commits into from Jul 13, 2022

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Jul 11, 2022

Summary
  • Adds a new build argument for our Docker images, 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).
  • Split the CFLAGS handling in the Docker image to it’s own script, simplifying the above-mentioned change.
  • Add a new build job to the Docker GHA workflow to build and publish an image with this argument set, using the image name netdata/netdata-debug. This will match tagging and versioning with netdata/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. If CFLAGS is set in the environment, it should print the contents of that variable, otherwise if DEBUG_BUILD is set to a non-empty string, it should print -Og -ggdb -pipe, otherwise it should print -O2 -pipe.

Additional Information

Fixes: #13341

@github-actions github-actions bot added area/ci area/packaging Packaging and operating systems support labels Jul 11, 2022
@Ferroin Ferroin marked this pull request as ready for review July 11, 2022 13:09
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
@Ferroin Ferroin requested a review from ilyam8 July 12, 2022 11:24
@Ferroin Ferroin merged commit 70f19ef into netdata:master Jul 13, 2022
@Ferroin Ferroin deleted the docker-debug-build branch July 13, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat]: build an additional Netdata nightly image with debug symbols in CI
2 participants