Skip to content

Commit

Permalink
Dedicated builder for triggering Galera builds
Browse files Browse the repository at this point in the history
 - easy to re-trigger all the builds.
 - when new platforms are introduced one can trigger a build by re-building "trigger-galera-builds" for a particular revision . No need to wait for upstream changes to build on new platforms.
  • Loading branch information
RazvanLiviuVarzaru committed Oct 14, 2024
1 parent 9992cf4 commit 2fe6de3
Showing 1 changed file with 65 additions and 3 deletions.
68 changes: 65 additions & 3 deletions master-galera/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ c = BuildmasterConfig = {}
config = {"private": {}}
exec(open("../master-private.cfg").read(), config, {})

FQDN = os.getenv("BUILDMASTER_WG_IP", default="100.64.100.1")

####### PROJECT IDENTITY

# the 'title' string will appear at the top of this buildbot installation's
Expand Down Expand Up @@ -89,9 +91,14 @@ schedulerTrigger = schedulers.AnyBranchScheduler(
repository="https://github.com/MariaDB/galera", branch_fn=upstream_branch_fn
),
treeStableTimer=60,
builderNames=builders_galera,
builderNames=["trigger-galera-builds"],
)
schedulerGaleraBuilders = schedulers.Triggerable(
name="s_galera_builders", builderNames=builders_galera
)

c["schedulers"].append(schedulerTrigger)
c["schedulers"].append(schedulerGaleraBuilders)

if os.getenv("ENVIRON") == "DEV":
schedulerTrigger = schedulers.AnyBranchScheduler(
Expand All @@ -101,7 +108,7 @@ if os.getenv("ENVIRON") == "DEV":
branch_fn=upstream_branch_fn,
),
treeStableTimer=60,
builderNames=builders_galera,
builderNames=["trigger-galera-builds"],
)
c["schedulers"].append(schedulerTrigger)

Expand All @@ -112,14 +119,45 @@ if os.getenv("ENVIRON") == "DEV":
# worker name and password must be configured on the worker.
c["workers"] = []

c["workers"].append(
worker.DockerLatentWorker(
"hz-bbw1-docker-galera-trigger",
None,
docker_host=config["private"]["docker_workers"]["hz-bbw1-docker"],
image=os.getenv("CONTAINER_REGISTRY_URL", default="quay.io/mariadb-foundation/bb-worker:") + "debian12",
followStartupLogs=False,
autopull=True,
alwaysPull=True,
masterFQDN=FQDN,
hostconfig={"shm_size": "1G"},
max_builds=1,
build_wait_timeout=0,
)
)

c["workers"].append(
worker.DockerLatentWorker(
"hz-bbw4-docker-galera-trigger",
None,
docker_host=config["private"]["docker_workers"]["hz-bbw4-docker"],
image=os.getenv("CONTAINER_REGISTRY_URL", default="quay.io/mariadb-foundation/bb-worker:") + "debian12",
followStartupLogs=False,
autopull=True,
alwaysPull=True,
masterFQDN=FQDN,
hostconfig={"shm_size": "1G"},
max_builds=1,
build_wait_timeout=0,
)
)

# Docker workers
GALERA_PACKAGES = os.getenv(
"GALERA_PACKAGES_DIR", default="/mnt/autofs/galera_packages"
)

workers = {}


def addWorker(
worker_name_prefix,
worker_id,
Expand Down Expand Up @@ -252,6 +290,16 @@ def rpmSave():

####### FACTORY CODE

f_trigger_builds = util.BuildFactory()
f_trigger_builds.addStep(
steps.Trigger(
schedulerNames=["s_galera_builders"],
waitForFinish=False,
updateSourceStamp=False,
doStepIf=waitIfStaging,
)
)

## f_deb_build - create source tarball
f_deb_build = util.BuildFactory()
f_deb_build.addStep(
Expand Down Expand Up @@ -387,6 +435,20 @@ f_rpm_build.addStep(
####### BUILDERS LIST
c["builders"] = []

c["builders"].append(
util.BuilderConfig(
name="trigger-galera-builds",
workernames=[
"hz-bbw1-docker-galera-trigger",
"hz-bbw4-docker-galera-trigger",
],
tags=["galera"],
collapseRequests=True,
nextBuild=nextBuild,
factory=f_trigger_builds,
)
)

for os_i in os_info:
if "install_only" in os_info[os_i] and os_info[os_i]["install_only"]:
continue
Expand Down

0 comments on commit 2fe6de3

Please sign in to comment.