Skip to content

Commit 4821773

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
hack/build-image: add devbuilds package source
Signed-off-by: John Mulligan <[email protected]>
1 parent 4df159b commit 4821773

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

hack/build-image

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,14 @@ DISTROS = [
9898
# PACKAGE_SOURCES - list of known package sources
9999
DEFAULT = "default"
100100
NIGHTLY = "nightly"
101-
PACKAGE_SOURCES = [DEFAULT, NIGHTLY]
101+
DEVBUILDS = "devbuilds"
102+
PACKAGE_SOURCES = [DEFAULT, NIGHTLY, DEVBUILDS]
103+
104+
PACKAGES_FROM = {
105+
DEFAULT: '',
106+
NIGHTLY: 'samba-nightly',
107+
DEVBUILDS: 'devbuilds',
108+
}
102109

103110
# SOURCE_DIRS - image source paths
104111
# (paths are relative to common image source dir)
@@ -196,8 +203,9 @@ def container_engine(cli):
196203
def container_build(cli, target):
197204
"""Construct and execute a command to build the target container image."""
198205
args = [container_engine(cli), "build"]
199-
if target.pkg_source == NIGHTLY:
200-
args.append("--build-arg=INSTALL_PACKAGES_FROM=samba-nightly")
206+
pkgs_from = PACKAGES_FROM[target.pkg_source]
207+
if pkgs_from:
208+
args.append(f"--build-arg=INSTALL_PACKAGES_FROM={pkgs_from}")
201209
# docker doesn't currently support alt. architectures
202210
if "docker" in args[0]:
203211
if target.arch != host_arch():

0 commit comments

Comments
 (0)