Skip to content

Commit

Permalink
Merge #33654: omnibus: add a way to force the generation of an instal…
Browse files Browse the repository at this point in the history
…lable package

Co-authored-by: Célian Raimbault <[email protected]>
  • Loading branch information
chouquette and CelianR authored Feb 21, 2025
1 parent 978f3e2 commit 92c2e3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/dev/agent_omnibus.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ affected by [this bug](https://github.com/moby/moby/issues/28705).

## Building on your system (Linux and Mac)

The project will be built locally then compressed in the final deb/rpm/dmg artifact.
The project will be built locally and provide a .tar.xz tarball (in the omnibus/pkg folder)
with the resulting artifacts by default on linux.
This artifact is the expected source when building a container image.
You can chose to generate an installable package in the form of a deb/rpm artifact by
providing a `OMNIBUS_FORCE_PACKAGES` environment variable during the build.
On macOS, a dmg artifact will always be generated.
Most of the files will be copied or created under the same installation path of
the final package, `/opt/datadog-agent`, but if you run Omnibus from Linux, some
files will be copied into `/etc`. This means two things:
Expand Down
3 changes: 3 additions & 0 deletions omnibus/config/projects/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
skip_healthcheck true
else
do_build = true
if ENV["OMNIBUS_FORCE_PACKAGES"]
do_package = true
end
end

# For now we build and package in the same stage for heroku
Expand Down
2 changes: 2 additions & 0 deletions tasks/omnibus.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ def get_omnibus_env(
'DD_CC',
'DD_CXX',
'DD_CMAKE_TOOLCHAIN',
'OMNIBUS_FORCE_PACKAGES',
'OMNIBUS_PACKAGE_ARTIFACT_DIR',
]
for key in env_to_forward:
if key in os.environ:
Expand Down

0 comments on commit 92c2e3b

Please sign in to comment.