Skip to content

Commit

Permalink
cleanup: master.cfg simplify worker name suffix/prefix construction
Browse files Browse the repository at this point in the history
No logic changes, just reorder the code to make it shorter.
  • Loading branch information
cvicentiu committed Feb 6, 2025
1 parent a80a02f commit bcdef3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
20 changes: 5 additions & 15 deletions master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ for w_name in master_config["workers"]:

for arch in master_config["builders"]:
builders = master_config["builders"][arch]
for os_name in builders:
os_definition = builders[os_name]
for os_name, os_definition in builders.items():
image_tag = os_definition['image_tag']

# Skip s390x non-SLES builders on SLES host (bbw2)
Expand Down Expand Up @@ -111,26 +110,17 @@ f_deb_autobake = getDebAutobakeFactory()


####### BUILDERS LIST

c["builders"] = []

for arch in master_config["builders"]:
worker_prefix = "x64" if arch in ["amd64", "x86"] else arch
worker_suffix = "-i386" if arch == "x86" else ""

builders_group = master_config["builders"][arch]
for os_name in builders_group:
worker_prefix = arch
worker_suffix = ''

if arch == "amd64":
worker_prefix = "x64"

if arch == "x86":
worker_prefix = 'x64'
worker_suffix = '-i386'
worker_name = f'{worker_prefix}-bbw-docker-{os_name}{worker_suffix}'

build_type = OS_INFO[os_name]["type"]

builder = f'{arch}-{os_name}'
build_type = OS_INFO[os_name]["type"]

tags = [os_name]
# Add builder only if it's not a protected branches one
Expand Down
2 changes: 1 addition & 1 deletion os_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ opensuse-1506:
tags:
- release_packages
- bleeding_edge
version_name: 156
version_name: 15
arch:
- amd64
type: rpm
Expand Down

0 comments on commit bcdef3b

Please sign in to comment.