Skip to content

Commit 526d8eb

Browse files
committed
Make envFromProperty reusable
* Eliminate statically hardcoding environment variables such as tarballnum * DEVELOPMENT_BRANCH is not used / maintained anymore, so should be dropped.
1 parent c1413f6 commit 526d8eb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

master-libvirt/master.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ INSTALL_UPGRADE_PROPERTIES_LIST = [
7070
# and finally removed from here.
7171
# Always set to "yes" within this file.
7272
"systemdCapability",
73+
# Set by tarball docker.
74+
"tarbuildnum",
7375
# "server", "all", "columnstore", "deps"
7476
# Impacts which tests are run. Set within this file only.
7577
"test_mode",

utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,10 @@
3636
exec(open("/srv/buildbot/master/master-private.cfg").read(), private_config, {})
3737

3838

39-
def envFromProperties(envlist: list[str]) -> dict[str, str]:
39+
def envFromProperties(properties: list[str]) -> dict[str, str]:
4040
d = {}
41-
for e in envlist:
42-
d[e] = util.Interpolate(f"%(prop:{e})s")
43-
d["tarbuildnum"] = util.Interpolate("%(prop:tarbuildnum)s")
44-
d["development_branch"] = DEVELOPMENT_BRANCH
41+
for prop_name in properties:
42+
d[prop_name] = util.Interpolate(f"%(prop:{prop_name})s")
4543
return d
4644

4745

0 commit comments

Comments
 (0)