From: Zack Cerza Date: Sat, 8 Feb 2025 00:16:20 +0000 (-0700) Subject: build-with-container.py: Add --env-file X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=129477b737c2b0fb0d4cb5c14179b9f9991773a4;p=ceph.git build-with-container.py: Add --env-file Signed-off-by: Zack Cerza (cherry picked from commit 8e9544fed3dc70ac91f995aacb3aed2edbd45554) --- diff --git a/src/script/build-with-container.py b/src/script/build-with-container.py index d22e20b1e0494..914b22b39c0d7 100755 --- a/src/script/build-with-container.py +++ b/src/script/build-with-container.py @@ -195,6 +195,8 @@ def _container_cmd(ctx, args, *, workdir=None, interactive=False): cmd.append("--pids-limit=-1") if ctx.map_user: cmd.append("--user=0") + if ctx.cli.env_file: + cmd.append(f"--env-file={ctx.cli.env_file.absolute()}") if workdir: cmd.append(f"--workdir={workdir}") cwd = pathlib.Path(".").absolute() @@ -930,6 +932,11 @@ def parse_cli(build_step_names): choices=build_step_names, help="Execute the target build step(s)", ) + parser.add_argument( + "--env-file", + type=pathlib.Path, + help="Use this environment file when building", + ) parser.add_argument( "--dry-run", action="store_true",