mirror of
https://github.com/daniviga/qgis3-cd-copr.git
synced 2024-11-26 02:06:14 +01:00
135 lines
5.2 KiB
INI
135 lines
5.2 KiB
INI
|
# -*- python -*-
|
||
|
# ex: set filetype=python:
|
||
|
|
||
|
from buildbot.plugins import *
|
||
|
from buildbot.process.properties import Property
|
||
|
|
||
|
# This is a sample buildmaster config file. It must be installed as
|
||
|
# 'master.cfg' in your buildmaster's base directory.
|
||
|
|
||
|
# This is the dictionary that the buildmaster pays attention to. We also use
|
||
|
# a shorter alias to save typing.
|
||
|
c = BuildmasterConfig = {}
|
||
|
|
||
|
####### WORKERS
|
||
|
|
||
|
# The 'workers' list defines the set of recognized workers. Each element is
|
||
|
# a Worker object, specifying a unique worker name and password. The same
|
||
|
# worker name and password must be configured on the worker.
|
||
|
#c['workers'] = [worker.Worker("worker", "work3rP@ss!")]
|
||
|
c['workers'] = [
|
||
|
worker.DockerLatentWorker('docker', 'work3rP@ss!',
|
||
|
docker_host='unix:///var/run/docker.sock',
|
||
|
image='buildbot-worker',
|
||
|
hostconfig={'cap_add': ['SYS_ADMIN']})
|
||
|
]
|
||
|
# 'protocols' contains information about protocols which master will use for
|
||
|
# communicating with workers. You must define at least 'port' option that workers
|
||
|
# could connect to your master with this protocol.
|
||
|
# 'port' must match the value configured into the workers (with their
|
||
|
# --master option)
|
||
|
c['protocols'] = {'pb': {'port': 9989}}
|
||
|
|
||
|
####### CHANGESOURCES
|
||
|
|
||
|
# the 'change_source' setting tells the buildmaster how it should find out
|
||
|
# about source code changes. Here we point to the buildbot version of a python hello-world project.
|
||
|
|
||
|
c['change_source'] = []
|
||
|
# FIXME
|
||
|
# c['change_source'].append(changes.GitPoller(
|
||
|
# 'git://github.com/buildbot/hello-world.git',
|
||
|
# workdir='gitpoller-workdir', branch='master',
|
||
|
# pollinterval=300))
|
||
|
#
|
||
|
####### SCHEDULERS
|
||
|
|
||
|
# Configure the Schedulers, which decide how to react to incoming changes. In this
|
||
|
# case, just kick off a 'qgis' build
|
||
|
|
||
|
c['schedulers'] = []
|
||
|
# FIXME
|
||
|
# c['schedulers'].append(schedulers.SingleBranchScheduler(
|
||
|
# name="all",
|
||
|
# change_filter=util.ChangeFilter(branch='master'),
|
||
|
# treeStableTimer=None,
|
||
|
# builderNames=["qgis"]))
|
||
|
c['schedulers'].append(schedulers.ForceScheduler(
|
||
|
name="Force_QGIS",
|
||
|
builderNames=["qgis"]))
|
||
|
|
||
|
####### BUILDERS
|
||
|
|
||
|
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
|
||
|
# what steps, and which workers can execute them. Note that any particular build will
|
||
|
# only take place on one worker.
|
||
|
|
||
|
def rpm_name(rc, stdout, stderr):
|
||
|
return stdout.split()[3]
|
||
|
|
||
|
qgis_factory = util.BuildFactory()
|
||
|
qgis_factory.addStep(steps.Git(repourl=Property('repository', 'git://github.com/qgis/qgis.git'), mode='full',
|
||
|
method='clobber', shallow=True, name="Clone"))
|
||
|
qgis_factory.addStep(steps.ShellCommand(command=["./buildrpms.sh", "-s", "-u"],
|
||
|
workdir="build/rpm", name="Build SRPM", env={"_MOCK_OLD_CHROOT": "true"}))
|
||
|
qgis_factory.addStep(steps.ShellCommand(command="ls", workdir="build/rpm/result", name="List artifacts"))
|
||
|
qgis_factory.addStep(steps.SetPropertyFromCommand(command="ls qgis*.src.rpm", property="srpm",
|
||
|
workdir="build/rpm/result", name="Get artifacts"))
|
||
|
qgis_factory.addStep(steps.ShellCommand(command=["copr-cli", "build", "qgis-testing", util.Interpolate("%(prop:srpm)s")],
|
||
|
workdir="build/rpm/result", timeout=10800, name="Build on COPR"))
|
||
|
|
||
|
# th_factory = util.BuildFactory() # dummy
|
||
|
|
||
|
c['builders'] = []
|
||
|
c['builders'].append(
|
||
|
util.BuilderConfig(name="qgis",
|
||
|
workernames=["docker"],
|
||
|
factory=qgis_factory))
|
||
|
|
||
|
####### BUILDBOT SERVICES
|
||
|
|
||
|
# 'services' is a list of BuildbotService items like reporter targets. The
|
||
|
# status of each build will be pushed to these targets. buildbot/reporters/*.py
|
||
|
# has a variety to choose from, like IRC bots.
|
||
|
|
||
|
c['services'] = []
|
||
|
|
||
|
####### PROJECT IDENTITY
|
||
|
|
||
|
# the 'title' string will appear at the top of this buildbot installation's
|
||
|
# home pages (linked to the 'titleURL').
|
||
|
|
||
|
c['title'] = "Build Server"
|
||
|
c['titleURL'] = "https://build.server"
|
||
|
|
||
|
# the 'buildbotURL' string should point to the location where the buildbot's
|
||
|
# internal web server is visible. This typically uses the port number set in
|
||
|
# the 'www' entry below, but with an externally-visible host name which the
|
||
|
# buildbot cannot figure out without some help.
|
||
|
|
||
|
c['buildbotURL'] = "https://build.server"
|
||
|
|
||
|
# minimalistic config to activate new web UI
|
||
|
c['www'] = dict(port=8010,
|
||
|
plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
|
||
|
|
||
|
c['www']['authz'] = util.Authz(
|
||
|
allowRules = [
|
||
|
util.AnyControlEndpointMatcher(role="admins", defaultDeny=True),
|
||
|
util.AnyEndpointMatcher(role="admins", defaultDeny=False),
|
||
|
# if future Buildbot implement new control, we are safe with this last rule
|
||
|
],
|
||
|
roleMatchers = [
|
||
|
util.RolesFromUsername(roles=['admins'], usernames=['<user>'])
|
||
|
]
|
||
|
)
|
||
|
c['www']['auth'] = util.UserPasswordAuth([('<user>','<password>')])
|
||
|
|
||
|
####### DB URL
|
||
|
|
||
|
c['db'] = {
|
||
|
# This specifies what database buildbot uses to store its state. You can leave
|
||
|
# this at its default for all but the largest installations.
|
||
|
'db_url' : "sqlite:///state.sqlite",
|
||
|
}
|