From 9d45420b12555271ec55555e73b1e2714220b051 Mon Sep 17 00:00:00 2001 From: vkalintiris Date: Wed, 17 Jan 2024 17:36:40 +0200 Subject: Rm ws --- packaging/dag/images.py | 4 ++-- packaging/dag/main.py | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/packaging/dag/images.py b/packaging/dag/images.py index fe2bc75232..ba918c2273 100644 --- a/packaging/dag/images.py +++ b/packaging/dag/images.py @@ -209,7 +209,7 @@ def static_build_libnetfilter_acct(client: dagger.Client, ctr: dagger.Container) client.git(url="git://git.netfilter.org/libnetfilter_acct", keep_git_dir=True) .tag("libnetfilter_acct-1.0.3").tree() ) - + ctr = ( ctr.with_directory("/libnetfilter_acct", tree) .with_workdir("/libnetfilter_acct") @@ -321,7 +321,7 @@ def static_build(client, repo_path): ) # TODO: link bin/sbin - + ctr = static_build_netdata(client, ctr) build_dir = ctr.directory('/opt/netdata') diff --git a/packaging/dag/main.py b/packaging/dag/main.py index 864a9de343..379d341771 100755 --- a/packaging/dag/main.py +++ b/packaging/dag/main.py @@ -143,8 +143,6 @@ class Distribution: return ctr - - class FeatureFlags(enum.Flag): DBEngine = enum.auto() @@ -210,6 +208,10 @@ class Context: host_repo_root = pathlib.Path(__file__).parent.parent.parent.as_posix() exclude_dirs = ["build", "fluent-bit/build"] + # The installer builds/stores intermediate artifacts under externaldeps/ + # We add a volume to speed up rebuilds. The volume has to be unique + # per platform/distro in order to avoid mixing unrelated artifacts + # together. externaldeps = self.distribution.cache_volume(self.client, self.platform, "externaldeps") ctr = ( @@ -231,15 +233,12 @@ def run_async(func): @run_async async def main(): - repo_root_container = pathlib.Path('/netdata') - install_prefix = "/opt" - - platform = dagger.Platform("linux/x86_64") - dist = Distribution("debian10", "debian:10") config = dagger.Config(log_output=sys.stdout) async with dagger.Connection(config) as client: # Create context + platform = dagger.Platform("linux/x86_64") + dist = Distribution("debian10", "debian:10") ctx = Context(client, platform, dist) # build base image with packages we need @@ -249,11 +248,11 @@ async def main(): ctr = ctx.mount_repo(ctr, "/netdata") # run the netdata installer - installer = NetdataInstaller(install_prefix, FeatureFlags.DBEngine) + installer = NetdataInstaller("/opt", FeatureFlags.DBEngine) ctr = installer.install(client, ctr, dist) - + await ctr - + if __name__ == '__main__': main() -- cgit v1.2.3