Skip to content

Commit

Permalink
builders_autobake|install|upgrade -> BUILDERS_AUTOBAKE|INSTALL|UPGRADE
Browse files Browse the repository at this point in the history
  • Loading branch information
cvicentiu committed Nov 26, 2024
1 parent 856d96f commit f91fdf8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
22 changes: 11 additions & 11 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,27 +241,27 @@
os_info = yaml.safe_load(f)

# Generate install builders based on the os_info data
builders_install = []
builders_upgrade = []
builders_autobake = []
all_platforms = set()
BUILDERS_INSTALL = []
BUILDERS_UPGRADE = []
BUILDERS_AUTOBAKE = []
ALL_PLATFORMS = set()
for os_i in os_info:
for arch in os_info[os_i]["arch"]:
builder_name_autobake = (
arch + "-" + os_i + "-" + os_info[os_i]["type"] + "-autobake"
)
if not ("install_only" in os_info[os_i] and os_info[os_i]["install_only"]):
all_platforms.add(arch)
builders_autobake.append(builder_name_autobake)
ALL_PLATFORMS.add(arch)
BUILDERS_AUTOBAKE.append(builder_name_autobake)
# Currently there are no VMs for x86 and s390x and OpenSUSE and SLES
if arch not in ["s390x", "x86"] and "sles" not in os_i:
builders_install.append(builder_name_autobake + "-install")
builders_upgrade.append(builder_name_autobake + "-minor-upgrade-all")
builders_upgrade.append(
BUILDERS_INSTALL.append(builder_name_autobake + "-install")
BUILDERS_UPGRADE.append(builder_name_autobake + "-minor-upgrade-all")
BUILDERS_UPGRADE.append(
builder_name_autobake + "-minor-upgrade-columnstore"
)
builders_upgrade.append(builder_name_autobake + "-major-upgrade")
BUILDERS_UPGRADE.append(builder_name_autobake + "-major-upgrade")

BUILDERS_GALERA = list(
map(lambda x: "gal-" + "-".join(x.split("-")[:3]), builders_autobake)
map(lambda x: "gal-" + "-".join(x.split("-")[:3]), BUILDERS_AUTOBAKE)
)
4 changes: 2 additions & 2 deletions locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def getLocks(props):

if (
builder_name in GITHUB_STATUS_BUILDERS
or builder_name in builders_install
or builder_name in builders_upgrade
or builder_name in BUILDERS_INSTALL
or builder_name in BUILDERS_UPGRADE
):
return []
locks = []
Expand Down
2 changes: 1 addition & 1 deletion master-galera/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def addWorker(
c["workers"].append(instance)


for platform in all_platforms:
for platform in ALL_PLATFORMS:
jobs = None
if platform == "amd64":
machines = ["hz-bbw"]
Expand Down
2 changes: 1 addition & 1 deletion master-libvirt/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ c["workers"] = []
c["builders"] = []

# Add the workers and builds based on the configured install builders (see constants.py)
for builder_name in builders_install:
for builder_name in BUILDERS_INSTALL:
# Parse builder name
platform, os_name, os_version, builder_type = builder_name.split("-")[:4]

Expand Down
12 changes: 6 additions & 6 deletions schedulers_definition.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from buildbot.plugins import schedulers, util
from constants import (
BUILDERS_AUTOBAKE,
BUILDERS_BIG,
BUILDERS_DOCKERLIBRARY,
BUILDERS_ECO,
BUILDERS_INSTALL,
BUILDERS_UPGRADE,
BUILDERS_WORDPRESS,
GITHUB_STATUS_BUILDERS,
SUPPORTED_PLATFORMS,
builders_autobake,
builders_install,
builders_upgrade,
)


Expand Down Expand Up @@ -38,7 +38,7 @@ def getProtectedBuilderNames(props):
@util.renderer
def getAutobakeBuilderNames(props):
builderName = props.getProperty("parentbuildername")
for b in builders_autobake:
for b in BUILDERS_AUTOBAKE:
if builderName in b:
return [b]
return []
Expand All @@ -58,7 +58,7 @@ def getBigtestBuilderNames(props):
def getInstallBuilderNames(props):
builderName = str(props.getProperty("parentbuildername"))

for b in builders_install:
for b in BUILDERS_INSTALL:
if builderName in b:
builders = [b]
if "rhel" in builderName:
Expand All @@ -73,7 +73,7 @@ def getUpgradeBuilderNames(props):
builderName = str(props.getProperty("parentbuildername"))

builds = []
for b in builders_upgrade:
for b in BUILDERS_UPGRADE:
if builderName in b:
if "rhel" in builderName:
builds.append(b.replace("rhel", "almalinux"))
Expand Down
12 changes: 6 additions & 6 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
DEVELOPMENT_BRANCH,
MTR_ENV,
SAVED_PACKAGE_BRANCHES,
builders_autobake,
builders_install,
builders_upgrade,
BUILDERS_AUTOBAKE,
BUILDERS_INSTALL,
BUILDERS_UPGRADE,
os_info,
RELEASE_BRANCHES,
)
Expand Down Expand Up @@ -448,7 +448,7 @@ def hasFiles(step):
def hasInstall(props):
builderName = str(props.getProperty("buildername"))

for b in builders_install:
for b in BUILDERS_INSTALL:
if builderName in b:
return True
return False
Expand All @@ -457,7 +457,7 @@ def hasInstall(props):
def hasUpgrade(props):
builderName = str(props.getProperty("buildername"))

for b in builders_upgrade:
for b in BUILDERS_UPGRADE:
if builderName in b:
return True
return False
Expand Down Expand Up @@ -552,7 +552,7 @@ def waitIfStaging(step):

def hasAutobake(props):
builderName = props.getProperty("buildername")
for b in builders_autobake:
for b in BUILDERS_AUTOBAKE:
if builderName in b:
return True
return False
Expand Down

0 comments on commit f91fdf8

Please sign in to comment.