taskotron: upgrade production to F29

This commit is contained in:
Kamil Páral 2019-04-03 13:21:00 +02:00
parent 7c3fa7c396
commit 780adf71a1
32 changed files with 393 additions and 2243 deletions

View file

@ -24,6 +24,7 @@ slaves_group: buildslaves
buildmaster: 10.5.124.206
buildslave_port: 9989
buildslave_password: "{{ prod_buildslave_password }}"
buildslaves_home: /srv/buildslaves
taskotron_admin_email: taskotron-admin-members@fedoraproject.org

View file

@ -13,8 +13,8 @@ eth0_nm: 255.255.255.128
# install
############################################################
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-27
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/27/Server/x86_64/os/
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-29
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/29/Server/x86_64/os/
volgroup: /dev/VirtGuests
datacenter: phx2
@ -29,5 +29,3 @@ lvm_size: 50000
mem_size: 4096
num_cpus: 4
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"

View file

@ -19,8 +19,8 @@ eth0_ip: 10.5.124.206
# install
############################################################
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-27-taskotron-master
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/27/Server/x86_64/os/
ks_url: http://10.5.126.23/repo/rhel/ks/kvm-fedora-29-taskotron-master
ks_repo: http://10.5.126.23/pub/fedora/linux/releases/29/Server/x86_64/os/
sudoers: "{{ private }}/files/sudo/qavirt-sudoers"
vmhost: virthost-comm03.qa.fedoraproject.org
volgroup: /dev/VirtGuests

View file

@ -1,77 +1,62 @@
# -*- python -*-
# ex: set syntax=python:
# ex: set filetype=python:
# This is a sample buildmaster config file. It must be installed as
from buildbot.plugins import *
# This is a 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 = {}
####### BUILDSLAVES
c['buildbotNetUsageData'] = 'basic'
# The 'slaves' list defines the set of recognized buildslaves. Each element is
# a BuildSlave object, specifying a unique slave name and password. The same
# slave name and password must be configured on the slave.
from buildbot.buildslave import BuildSlave
c['slaves'] = [
####### 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'] = [
{% for buildslave in buildslaves %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
BuildSlave("{{ buildslave }}", "{{ buildslave_password }}"),
{% endif %}
{% if deployment_type == 'local' %}
BuildSlave("{{ buildslave }}", "{{ local_buildslave_password }}"),
worker.Worker("{{ buildslave }}", "{{ buildslave_password }}"),
{% elif deployment_type == 'local' %}
worker.Worker("{{ buildslave }}", "{{ local_buildslave_password }}"),
{% endif %}
{% endfor %}
]
# 'slavePortnum' defines the TCP port to listen on for connections from slaves.
# This must match the value configured into the buildslaves (with their
# '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['slavePortnum'] = {{ buildslave_port }}
c['protocols'] = {'pb': {'port': {{ buildslave_port }} }}
####### CHANGESOURCES
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Here we point to the buildbot clone of pyflakes.
#from buildbot.changes.gitpoller import GitPoller
#c['change_source'] = []
#c['change_source'].append(GitPoller(
# 'gitolite3@localhost:exampletrigger',
# workdir='gitpoller-workdir', branch='master',
# pollinterval=300))
#c['change_source'].append(GitPoller(
# 'git://github.com/buildbot/pyflakes.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 'runtests' build
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler, StringParameter
from buildbot.changes import filter
from buildbot.schedulers.basic import BaseBasicScheduler
from buildbot import util
import buildbot.schedulers.basic
class JobScheduler(BaseBasicScheduler):
class JobScheduler(buildbot.schedulers.basic.BaseBasicScheduler):
def __init__(self, name, **kwargs):
BaseBasicScheduler.__init__(self, name, **kwargs)
buildbot.schedulers.basic.BaseBasicScheduler.__init__(self, name, **kwargs)
def getChangeFilter(self, branch, branches, change_filter, categories):
return filter.ChangeFilter.fromSchedulerConstructorArgs(
return util.ChangeFilter.fromSchedulerConstructorArgs(
change_filter=change_filter, categories=categories)
def getTimerNameForChange(self, changes):
return "only"
def getChangeClassificationsForTimer(self, objectid, timer_name):
return self.master.db.schedulers.getChangeClassifications(
self.objectid)
def getChangeClassificationsForTimer(self, sched_id, timer_name):
return self.master.db.schedulers.getChangeClassifications(sched_id)
c['schedulers'] = []
@ -79,185 +64,215 @@ c['schedulers'].append(JobScheduler(
name="jobsched-noarch",
builderNames=["all"],
treeStableTimer=None,
change_filter=filter.ChangeFilter(project='rpmcheck',
change_filter=util.ChangeFilter(project='rpmcheck',
category='noarch')))
c['schedulers'].append(JobScheduler(
name="jobsched-i386",
builderNames=['i386'],
treeStableTimer=None,
change_filter=filter.ChangeFilter(project='rpmcheck',
change_filter=util.ChangeFilter(project='rpmcheck',
category='i386')))
c['schedulers'].append(JobScheduler(
name="jobsched-x86_64",
builderNames=['x86_64'],
treeStableTimer=None,
change_filter=filter.ChangeFilter(project='rpmcheck',
change_filter=util.ChangeFilter(project='rpmcheck',
category='x86_64')))
#c['schedulers'].append(SingleBranchScheduler(
# name="all",
# change_filter=filter.ChangeFilter(branch='master'),
# treeStableTimer=None,
# builderNames=["all", 'x86_64', 'i386']))
c['schedulers'].append(ForceScheduler(
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["all", 'x86_64', 'i386']))
c['schedulers'].append(ForceScheduler(
c['schedulers'].append(schedulers.ForceScheduler(
name="rpmcheck",
builderNames=["all", 'x86_64', 'i386'],
properties=[
StringParameter(name='taskname',
label='name of check to run',
util.StringParameter(
name='taskname',
default='rpmlint',
size=256,
),
util.StringParameter(
name='item',
default='',
size=256),
StringParameter(name='item',
label='object to use',
size=256,
),
util.StringParameter(
name='item_type',
default='koji_build',
size=256,
),
util.StringParameter(
name='uuid',
default='',
size=256),
StringParameter(name='item_type',
label='type of object to use',
default='',
size=256),
StringParameter(name='uuid',
label='UUID of the build in progress',
default='',
size=256),
StringParameter(name='arch',
label='arch of rpm to test',
size=256,
),
util.StringParameter(
name='arch',
default='x86_64',
size=128)]))
{% if deployment_type in ['dev', 'stg', 'prod'] %}
c['schedulers'].append(JobScheduler(
name="jobsched-distgit",
builderNames=['distgit'],
treeStableTimer=None,
change_filter=filter.ChangeFilter(project='distgit_checks',
category='x86_64')))
size=128,
),
]))
c['schedulers'].append(ForceScheduler(
name="distgit_checks",
builderNames=["distgit"],
properties=[
StringParameter(name='taskname',
label='name of check to run',
default='',
size=256),
StringParameter(name='item',
label='object to use',
default='',
size=256),
StringParameter(name='item_type',
label='type of object to use',
default='',
size=256),
StringParameter(name='uuid',
label='UUID of the build in progress',
default='',
size=256),
StringParameter(name='arch',
label='arch of rpm to test',
default='x86_64',
size=128)]))
{% endif %}
####### RESOURCE LOCKS
#
# This is a set of resource locks to make sure that we don't have too many things
# going on on each slave at one time.
build_lock = util.WorkerLock("worker_builds",
maxCount=1)
####### BUILDERS
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
# what steps, and which slaves can execute them. Note that any particular build will
# only take place on one slave.
# what steps, and which workers can execute them. Note that any particular build will
# only take place on one worker.
from buildbot.process.factory import BuildFactory
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
from buildbot.process.properties import Property, Interpolate
from buildbot.steps.slave import RemoveDirectory
from buildbot.steps.transfer import DirectoryUpload, FileUpload
from buildbot.steps.master import MasterShellCommand
factory = util.BuildFactory()
factory = BuildFactory()
{% if deployment_type in ['local'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(ShellCommand(command="rm -rf /var/tmp/taskotron/*", name="rm_tmp", descriptionDone=['Clean tmp']))
factory.addStep(steps.ShellCommand(
command="rm -rf /var/tmp/taskotron/*",
name="rm_tmp",
descriptionDone=['Clean tmp'],
))
# clean the log (see T230)
factory.addStep(ShellCommand(command=["rm", "-f", "/var/log/taskotron/taskotron.log"], name="rm_log", descriptionDone=['Clean log']))
factory.addStep(steps.ShellCommand(
command=["rm", "-f", "/var/log/taskotron/taskotron.log"],
name="rm_log",
descriptionDone=['Clean log'],
))
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(ShellCommand(command=Interpolate("rm -rf /var/tmp/taskotron/%(prop:slavename)s/*"), name="rm_tmp", description='Clean tmp'))
factory.addStep(steps.ShellCommand(
command=util.Interpolate("rm -rf /var/tmp/taskotron/%(prop:workername)s/*"),
name="rm_tmp",
descriptionDone='Clean tmp',
))
{% endif %}
# prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.ShellCommand(
command=util.Interpolate(
'mkdir /var/lib/taskotron/artifacts/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on slave',
haltOnFailure=True,
))
# check out the source
factory.addStep(Git(repourl=Property('git_repo', default=Interpolate('{{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/%(prop:taskname)s/')),
branch=Property('git_branch', default='{{ grokmirror_default_branch }}'),
factory.addStep(steps.Git(
repourl=util.Property('git_repo', default=util.Interpolate(
'{{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/%(prop:taskname)s/')),
branch=util.Property('git_branch', default='{{ grokmirror_default_branch }}'),
mode='full',
method='clobber',
shallow=True,
descriptionDone='Clone task'))
descriptionDone='Clone task',
))
# run the runner
factory.addStep(ShellCommand(command=["runtask",
'-i', Interpolate('%(prop:item)s'),
'-t', Interpolate('%(prop:item_type)s'),
'-a', Interpolate('%(prop:arch)s'),
'-j', Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', Interpolate('%(prop:uuid)s'),
'.'],
description=[Interpolate('%(prop:taskname)s on '), Interpolate('%(prop:item)s (%(prop:arch)s)')],
factory.addStep(steps.ShellCommand(
command=["runtask",
'-i', util.Interpolate('%(prop:item)s'),
'-t', util.Interpolate('%(prop:item_type)s'),
'-a', util.Interpolate('%(prop:arch)s'),
'-j', util.Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', util.Interpolate('%(prop:uuid)s'),
'.',
],
descriptionDone=[
util.Interpolate('%(prop:taskname)s on '),
util.Interpolate('%(prop:item)s (%(prop:arch)s)')
],
name='runtask',
timeout=20*60,
{% if deployment_type in ['dev', 'stg', 'prod'] %}
sigtermTime=5*60,
lazylogfiles=True,
logfiles={
'taskotron.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/taskotron.log')},
'heartbeat.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
}
{% endif %}
{% if deployment_type in ['local'] %}
logfiles={'taskotron.log': {'filename': '/var/log/taskotron/taskotron.log', }}
'taskotron.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/taskotron.log')},
'heartbeat.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
},
{% elif deployment_type in ['local'] %}
logfiles={
'taskotron.log': {'filename': '/var/log/taskotron/taskotron.log'},
},
{% endif %}
))
# make sure minion is removed
factory.addStep(ShellCommand(command=Interpolate('testcloud instance remove --force taskotron-%(prop:uuid)s; true'),
description='Remove minion'))
factory.addStep(steps.ShellCommand(
command=util.Interpolate('testcloud instance remove --force taskotron-%(prop:uuid)s; true'),
descriptionDone='Remove minion',
))
# create artifacts dir on master
factory.addStep(MasterShellCommand(command=["mkdir", '-m', '0755', Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s')],
descriptionDone='Create artifacs dir'))
# and also prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -m 0755 {{ public_artifacts_dir }}/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on master',
haltOnFailure=True,
))
# copy artifacts to master
factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/'),
descriptionDone='Copy artifacts'))
factory.addStep(steps.DirectoryUpload(
workersrc=util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/'),
descriptionDone='Copy artifacts',
))
# save stdio from runtask step
factory.addStep(MasterShellCommand(command=['curl', '-o', Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/taskotron/stdio.log'), Interpolate('http://127.0.0.1/taskmaster/builders/%(prop:buildername)s/builds/%(prop:buildnumber)s/steps/runtask/logs/stdio/text')],
descriptionDone='Save runtask stdio log'))
# FIXME: worked with buildbot 0.8, later buildbots changed URLs
# factory.addStep(steps.MasterShellCommand(
# command=['curl', '-o', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/taskotron/stdio.log'),
# util.Interpolate('http://127.0.0.1/taskmaster/builders/%(prop:buildername)s/builds/'
# '%(prop:buildnumber)s/steps/runtask/logs/stdio/text')
# ],
# descriptionDone='Save runtask stdio log',
# ))
# ensure all artifacts are readable
factory.addStep(MasterShellCommand(command=['chmod', '-R', 'o+r', Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/')],
descriptionDone='Set file permissions'))
factory.addStep(steps.MasterShellCommand(
command=['chmod', '-R', 'o+r', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/')],
descriptionDone='Set file permissions',
))
# gzip artifacts
factory.addStep(MasterShellCommand(command=Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
descriptionDone='Compress artifacs'))
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
descriptionDone='Compress artifacs',
))
{% if deployment_type in ['local'] %}
# copy taskotron log to master
factory.addStep(FileUpload(slavesrc='/var/log/taskotron/taskotron.log',
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
mode=0644))
factory.addStep(steps.FileUpload(
workersrc='/var/log/taskotron/taskotron.log',
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
mode=0644,
))
{% endif %}
# move the artifacts to the correct dir on the master
# render current time when needed
import datetime
from buildbot.process.properties import renderer
@ -265,224 +280,116 @@ from buildbot.process.properties import renderer
def today(props):
return datetime.datetime.now().strftime("%Y%m%d")
# move artifacts dir
factory.addStep(MasterShellCommand(command=Interpolate('mkdir -p -m 0755 {{ public_artifacts_dir }}/%(kw:today)s && mkdir -p -m 0755 {{ public_artifacts_dir }}/all && mv {{ public_artifacts_dir }}/%(prop:uuid)s/ {{ public_artifacts_dir }}/%(kw:today)s/ && ln -s {{ public_artifacts_dir }}/%(kw:today)s/%(prop:uuid)s {{ public_artifacts_dir }}/all/', today=today),
descriptionDone='Move artifacs'))
{% if deployment_type in ['dev', 'stg', 'prod'] %}
# this is for package-specific tasks
distgit_factory = BuildFactory()
# clean out /var/tmp/taskotron (see T253)
distgit_factory.addStep(ShellCommand(command=Interpolate("rm -rf /var/tmp/taskotron/%(prop:slavename)s/*"), name="rm_tmp", descriptionDone=['Clean tmp']))
{% if deployment_type in ['dev', 'prod'] %}
# check out the source from prod dist-git
distgit_factory.addStep(Git(repourl=Property('git_repo', default=Interpolate('http://pkgs02.phx2.fedoraproject.org/rpms/{}/'.format("%(prop:item)s".split('-')[0]))),
branch=Property('git_branch', default='master'),
mode='full',
method='clobber',
shallow=True))
{% else %}
# check out the source from stg dist-git
distgit_factory.addStep(Git(repourl=Property('git_repo', default=Interpolate('http://pkgs01.stg.phx2.fedoraproject.org/rpms/{}/'.format("%(prop:item)s".split('-')[0]))),
branch=Property('git_branch', default='master'),
mode='full',
method='clobber',
shallow=True))
{% endif %}
# run the runner
distgit_factory.addStep(ShellCommand(command=["runtask",
'-i', Interpolate('%(prop:item)s'),
'-t', Interpolate('%(prop:item_type)s'),
'-a', Interpolate('%(prop:arch)s'),
'-j', Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', Interpolate('%(prop:uuid)s'),
Interpolate('%(prop:taskname)s')],
descriptionDone=[Interpolate('%(prop:taskname)s on %(prop:item)s')],
name='runtask',
timeout=2400,
logfiles={
'taskotron-overlord.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-overlord.log')},
'taskotron-stdio.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-stdio.log')},
'taskotron.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron.log')}
}
# move the artifacts to the correct dir on the master
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -p -m 0755 {{ public_artifacts_dir }}/%(kw:today)s && '
'mkdir -p -m 0755 {{ public_artifacts_dir }}/all && '
'mv {{ public_artifacts_dir }}/%(prop:uuid)s/ {{ public_artifacts_dir }}/%(kw:today)s/ && '
'ln -s {{ public_artifacts_dir }}/%(kw:today)s/%(prop:uuid)s {{ public_artifacts_dir }}/all/',
today=today),
descriptionDone='Move artifacs',
))
distgit_factory.addStep(ShellCommand(command=Interpolate('testcloud instance remove --force taskotron-%(prop:uuid)s; true'),
descriptionDone=['Make sure the minion is removed']))
# create artifacts dir on master
distgit_factory.addStep(MasterShellCommand(command=["mkdir", '-m', '0755', Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s')],
descriptionDone=['Create artifacs dir']))
# copy artifacts to master
distgit_factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/task_output')))
# gzip artifacts
distgit_factory.addStep(MasterShellCommand(command=Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/task_output/ -type f -exec gzip {} \;'),
descriptionDone=['gzip artifacs dir content']))
{% endif %}
# move artifacts dir
distgit_factory.addStep(MasterShellCommand(command=Interpolate('mkdir -p -m 0755 {{ public_artifacts_dir }}/%(kw:today)s && mkdir -p -m 0755 {{ public_artifacts_dir }}/all && mv {{ public_artifacts_dir }}/%(prop:uuid)s/ {{ public_artifacts_dir }}/%(kw:today)s/ && ln -s {{ public_artifacts_dir }}/%(kw:today)s/%(prop:uuid)s {{ public_artifacts_dir }}/all/', today=today),
descriptionDone=['Move artifacs dir']))
####### RESOURCE LOCKS
#
# This is a set of resource locks to make sure that we don't have too many things
# going on on each slave at one time.
from buildbot import locks
build_lock = locks.SlaveLock("slave_builds",
maxCount = 1)
####### Builders
#
# The builders associate factories with slaves which are capable of executing those factory's tasks
from buildbot.config import BuilderConfig
c['builders'] = []
c['builders'].append(
BuilderConfig(name="x86_64",
slavenames=[{% for buildslave in x86_64_buildslaves %}"{{ buildslave }}",{% endfor %}],
factory=factory, locks=[build_lock.access('counting')],
mergeRequests=False))
c['builders'].append(util.BuilderConfig(
name="x86_64",
workernames=[
{% for buildslave in x86_64_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(
BuilderConfig(name="i386",
slavenames=[{% for buildslave in i386_buildslaves %}"{{ buildslave }}",{% endfor %}],
factory=factory, locks=[build_lock.access('counting')],
mergeRequests=False))
c['builders'].append(util.BuilderConfig(
name="i386",
workernames=[
{% for buildslave in i386_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(
BuilderConfig(name="all",
slavenames=[{% for buildslave in buildslaves %}"{{ buildslave }}",{% endfor %}],
factory=factory, locks=[build_lock.access('counting')],
mergeRequests=False))
c['builders'].append(util.BuilderConfig(
name="all",
workernames=[
{% for buildslave in buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(
BuilderConfig(name="distgit",
slavenames=[{% for buildslave in x86_64_buildslaves %}"{{ buildslave }}",{% endfor %}],
factory=distgit_factory, locks=[build_lock.access('counting')],
mergeRequests=False))
####### STATUS TARGETS
# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
# including web pages, email senders, and IRC bots.
####### BUILDBOT SERVICES
c['status'] = []
# '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.
from buildbot.status import html
from buildbot.status.web import authz, auth
c['services'] = []
authz_cfg=authz.Authz(
# change any of these to True to enable; see the manual for more
# options
{% if deployment_type == 'dev' %}
auth=auth.BasicAuth([("{{ dev_buildbot_user }}","{{ dev_buildbot_password }}")]),
{% endif %}
{% if deployment_type == 'stg' %}
auth=auth.BasicAuth([("{{ stg_buildbot_user }}","{{ stg_buildbot_password }}")]),
{% endif %}
{% if deployment_type == 'prod' %}
auth=auth.BasicAuth([("{{ prod_buildbot_user }}","{{ prod_buildbot_password }}")]),
{% endif %}
{% if deployment_type == 'local' %}
auth=auth.BasicAuth([("{{ local_buildbot_user }}","{{ local_buildbot_password }}")]),
{% endif %}
gracefulShutdown = False,
forceBuild = 'auth', # use this to test your slave once it is set up
forceAllBuilds = False,
pingBuilder = False,
stopBuild = False,
stopAllBuilds = True,
cancelPendingBuild = True,
## Email notifications
from buildbot.plugins import reporters
{% raw %}
email_template = u'''
<h4>Build status: {{ summary }}</h4>
<table cellspacing="10">
<tr><td>Task:</td><td><b>{{ build['properties']['taskname'][0] }}</b></td></tr>
<tr><td>Item:</td><td><b>{{ build['properties']['item'][0] }}</b></td></tr>
<tr><td>Item type:</td><td><b>{{ build['properties']['item_type'][0] }}</b></td></tr>
<tr><td>Arch:</td><td><b>{{ build['properties']['arch'][0] }}</b></td></tr>
<tr><td>Worker:</td><td><b>{{ workername }}</b></td></tr>
<tr><td>Artifacts:</td><td><a href="{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}">
{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}</a></td></tr>
<tr><td>Complete logs:</td><td><a href="{{ build_url }}">{{ build_url }}</a></td></tr>
</table>
{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
<p><b>Step: {{ step['name'] }}: {{ statuses[step['results']] }}</b></p>
{% for log in step['logs'] %}
<p>Last 40 lines of <i>{{ log['name'] }}</i>:</p>
{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
<pre>
{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
{% endfor %}
</pre>
<hr/>
{% endfor %}
{% endfor %}
'''
{% endraw %}
html_message_formatter = reporters.MessageFormatter(
template=email_template,
template_type='html',
wantProperties=True,
wantSteps=True,
wantLogs=True,
ctx=dict(
statuses=util.Results,
artifacts_url="https://{{ external_hostname }}/artifacts/all",
),
)
c['status'].append(html.WebStatus(http_port=8080, authz=authz_cfg,
change_hook_dialects={'base':True}))
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
from buildbot.status.mail import MailNotifier
from buildbot.status.builder import Results
from buildbot.status.results import FAILURE, EXCEPTION, WARNINGS
import cgi
import re
# http://docs.buildbot.net/current/manual/cfg-statustargets.html#mailnotifier
def html_message_formatter(mode, name, build, results, master_status):
"""Provide a customized message to Buildbot's MailNotifier.
The last 80 lines of the log are provided as well as the changes
relevant to the build. Message content is formatted as html.
"""
result = Results[results]
limit_lines = 40
text = list()
text.append(u'<h4>Build status: %s</h4>' % result.upper())
text.append(u'<table cellspacing="10"><tr>')
text.append(u"<td>Buildslave for this Build:</td><td><b>%s</b></td></tr>" % build.getSlavename())
if master_status.getURLForThing(build):
text.append(u'<tr><td>Complete logs for all build steps:</td><td><a href="%s">%s</a></td></tr>'
% (master_status.getURLForThing(build),
master_status.getURLForThing(build))
)
text.append(u'</table>')
logs = []
steps = build.getSteps()
for step in steps:
status, dummy = step.getResults()
if status not in [FAILURE, EXCEPTION, WARNINGS]:
continue
logs = step.getLogs()
# logs within a step are in reverse order. Search back until we find stdio
for log in reversed(logs):
if log.getName() == 'stdio':
break
name = "%s.%s" % (log.getStep().getName(), log.getName())
status, dummy = log.getStep().getResults()
content = log.getText().splitlines() # Note: can be VERY LARGE
if step.getName() == 'runtask':
found = re.search("task=\['(.*)\.yml'\]", ''.join(content[0:5]))
if found:
taskname = found.group(1)
text.insert(0, '<h4>Task name: %s</h4>' % taskname.upper())
url = u'%s/steps/%s/logs/%s' % (master_status.getURLForThing(build),
log.getStep().getName(), log.getName())
text.append(u'<h4>Last %d lines of "%s"</h4>' % (limit_lines, name))
unilist = list()
for line in content[len(content)-limit_lines:]:
unilist.append(cgi.escape(unicode(line,'utf-8')))
text.append(u'<pre>')
text.extend(unilist)
text.append(u'</pre>')
return {
'body': u"\n".join(text),
'type': 'html'
}
mn = MailNotifier(fromaddr='taskotron@fedoraproject.org',
mn = reporters.MailNotifier(
fromaddr='taskotron@fedoraproject.org',
sendToInterestedUsers=False,
subject="%(projectName)s %(result)s on {{ deployment_type }} %(builder)s",
mode=('failing', 'exception', 'warnings'),
@ -490,42 +397,78 @@ mn = MailNotifier(fromaddr='taskotron@fedoraproject.org',
relayhost="bastion.phx2.fedoraproject.org",
messageFormatter=html_message_formatter)
c['status'].append(mn)
c['services'].append(mn)
# ExecDB's push-notifications:
import buildbot.status.status_push
sp = buildbot.status.status_push.HttpStatusPush(
## ExecDB's push-notifications
sp = reporters.HttpStatusPush(
serverUrl="{{ execdb_statuspush }}",
debug=True)
c['status'].append(sp)
wantProperties=True,
wantSteps=True,
)
c['services'].append(sp)
####### PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot
# installation's html.WebStatus home page (linked to the
# 'titleURL') and is embedded in the title of the waterfall HTML page.
# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').
c['title'] = "Taskotron"
c['titleURL'] = "http://{{ external_hostname }}/{{buildmaster_endpoint}}/"
c['titleURL'] = "https://{{ external_hostname }}/{{buildmaster_endpoint}}/"
# the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out
# without some help.
# 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://{{ external_hostname }}/{{buildmaster_endpoint}}/"
####### WEB
c['www'] = {
'port': 8010,
'change_hook_dialects': {
'base': True,
},
'auth': util.UserPasswordAuth({
{% if deployment_type == 'dev' %}
"{{ dev_buildbot_user }}": "{{ dev_buildbot_password }}",
{% elif deployment_type == 'stg' %}
"{{ stg_buildbot_user }}": "{{ stg_buildbot_password }}",
{% elif deployment_type == 'prod' %}
"{{ prod_buildbot_user }}": "{{ prod_buildbot_password }}",
{% elif deployment_type == 'local' %}
"{{ local_buildbot_user }}": "{{ local_buildbot_password }}",
{% endif %}
}),
'authz': util.Authz(
allowRules=[
util.AnyControlEndpointMatcher(role="admins"),
],
roleMatchers=[
{% if deployment_type == 'dev' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ dev_buildbot_user }}"]),
{% elif deployment_type == 'stg' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ stg_buildbot_user }}"]),
{% elif deployment_type == 'prod' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ prod_buildbot_user }}"]),
{% elif deployment_type == 'local' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ local_buildbot_user }}"]),
{% endif %}
]
),
}
c['buildbotURL'] = "http://{{ external_hostname }}/{{buildmaster_endpoint}}/"
####### 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.
# This specifies what database buildbot uses to store its state.
{% if deployment_type in ['dev', 'stg', 'prod'] %}
'db_url' : "postgresql://{{ buildmaster_db_user }}:{{ buildmaster_db_password }}@{{ buildmaster_db_host }}/{{ buildmaster_db_name }}",
{% endif %}
{% if deployment_type == 'local' %}
{% elif deployment_type == 'local' %}
'db_url' : "postgresql://{{ local_buildmaster_db_user }}:{{ local_buildmaster_db_password }}@127.0.0.1/{{ buildmaster_db_name }}",
{% endif %}
}

View file

@ -1,474 +0,0 @@
# -*- python -*-
# ex: set filetype=python:
from buildbot.plugins import *
# This is a 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 = {}
c['buildbotNetUsageData'] = 'basic'
####### 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'] = [
{% for buildslave in buildslaves %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
worker.Worker("{{ buildslave }}", "{{ buildslave_password }}"),
{% elif deployment_type == 'local' %}
worker.Worker("{{ buildslave }}", "{{ local_buildslave_password }}"),
{% endif %}
{% endfor %}
]
# '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': {{ buildslave_port }} }}
####### SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'runtests' build
import buildbot.schedulers.basic
class JobScheduler(buildbot.schedulers.basic.BaseBasicScheduler):
def __init__(self, name, **kwargs):
buildbot.schedulers.basic.BaseBasicScheduler.__init__(self, name, **kwargs)
def getChangeFilter(self, branch, branches, change_filter, categories):
return util.ChangeFilter.fromSchedulerConstructorArgs(
change_filter=change_filter, categories=categories)
def getTimerNameForChange(self, changes):
return "only"
def getChangeClassificationsForTimer(self, sched_id, timer_name):
return self.master.db.schedulers.getChangeClassifications(sched_id)
c['schedulers'] = []
c['schedulers'].append(JobScheduler(
name="jobsched-noarch",
builderNames=["all"],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='noarch')))
c['schedulers'].append(JobScheduler(
name="jobsched-i386",
builderNames=['i386'],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='i386')))
c['schedulers'].append(JobScheduler(
name="jobsched-x86_64",
builderNames=['x86_64'],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='x86_64')))
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["all", 'x86_64', 'i386']))
c['schedulers'].append(schedulers.ForceScheduler(
name="rpmcheck",
builderNames=["all", 'x86_64', 'i386'],
properties=[
util.StringParameter(
name='taskname',
default='rpmlint',
size=256,
),
util.StringParameter(
name='item',
default='',
size=256,
),
util.StringParameter(
name='item_type',
default='koji_build',
size=256,
),
util.StringParameter(
name='uuid',
default='',
size=256,
),
util.StringParameter(
name='arch',
default='x86_64',
size=128,
),
]))
####### RESOURCE LOCKS
#
# This is a set of resource locks to make sure that we don't have too many things
# going on on each slave at one time.
build_lock = util.WorkerLock("worker_builds",
maxCount=1)
####### 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.
factory = util.BuildFactory()
{% if deployment_type in ['local'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(steps.ShellCommand(
command="rm -rf /var/tmp/taskotron/*",
name="rm_tmp",
descriptionDone=['Clean tmp'],
))
# clean the log (see T230)
factory.addStep(steps.ShellCommand(
command=["rm", "-f", "/var/log/taskotron/taskotron.log"],
name="rm_log",
descriptionDone=['Clean log'],
))
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(steps.ShellCommand(
command=util.Interpolate("rm -rf /var/tmp/taskotron/%(prop:workername)s/*"),
name="rm_tmp",
descriptionDone='Clean tmp',
))
{% endif %}
# prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.ShellCommand(
command=util.Interpolate(
'mkdir /var/lib/taskotron/artifacts/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on slave',
haltOnFailure=True,
))
# check out the source
factory.addStep(steps.Git(
repourl=util.Property('git_repo', default=util.Interpolate(
'{{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/%(prop:taskname)s/')),
branch=util.Property('git_branch', default='{{ grokmirror_default_branch }}'),
mode='full',
method='clobber',
shallow=True,
descriptionDone='Clone task',
))
# run the runner
factory.addStep(steps.ShellCommand(
command=["runtask",
'-i', util.Interpolate('%(prop:item)s'),
'-t', util.Interpolate('%(prop:item_type)s'),
'-a', util.Interpolate('%(prop:arch)s'),
'-j', util.Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', util.Interpolate('%(prop:uuid)s'),
'.',
],
descriptionDone=[
util.Interpolate('%(prop:taskname)s on '),
util.Interpolate('%(prop:item)s (%(prop:arch)s)')
],
name='runtask',
timeout=20*60,
{% if deployment_type in ['dev', 'stg', 'prod'] %}
sigtermTime=5*60,
lazylogfiles=True,
logfiles={
'taskotron.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/taskotron.log')},
'heartbeat.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
},
{% elif deployment_type in ['local'] %}
logfiles={
'taskotron.log': {'filename': '/var/log/taskotron/taskotron.log'},
},
{% endif %}
))
# make sure minion is removed
factory.addStep(steps.ShellCommand(
command=util.Interpolate('testcloud instance remove --force taskotron-%(prop:uuid)s; true'),
descriptionDone='Remove minion',
))
# create artifacts dir on master
# and also prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -m 0755 {{ public_artifacts_dir }}/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on master',
haltOnFailure=True,
))
# copy artifacts to master
factory.addStep(steps.DirectoryUpload(
workersrc=util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/'),
descriptionDone='Copy artifacts',
))
# save stdio from runtask step
# FIXME: worked with buildbot 0.8, later buildbots changed URLs
# factory.addStep(steps.MasterShellCommand(
# command=['curl', '-o', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/taskotron/stdio.log'),
# util.Interpolate('http://127.0.0.1/taskmaster/builders/%(prop:buildername)s/builds/'
# '%(prop:buildnumber)s/steps/runtask/logs/stdio/text')
# ],
# descriptionDone='Save runtask stdio log',
# ))
# ensure all artifacts are readable
factory.addStep(steps.MasterShellCommand(
command=['chmod', '-R', 'o+r', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/')],
descriptionDone='Set file permissions',
))
# gzip artifacts
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
descriptionDone='Compress artifacs',
))
{% if deployment_type in ['local'] %}
# copy taskotron log to master
factory.addStep(steps.FileUpload(
workersrc='/var/log/taskotron/taskotron.log',
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
mode=0644,
))
{% endif %}
# render current time when needed
import datetime
from buildbot.process.properties import renderer
@renderer
def today(props):
return datetime.datetime.now().strftime("%Y%m%d")
# move the artifacts to the correct dir on the master
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -p -m 0755 {{ public_artifacts_dir }}/%(kw:today)s && '
'mkdir -p -m 0755 {{ public_artifacts_dir }}/all && '
'mv {{ public_artifacts_dir }}/%(prop:uuid)s/ {{ public_artifacts_dir }}/%(kw:today)s/ && '
'ln -s {{ public_artifacts_dir }}/%(kw:today)s/%(prop:uuid)s {{ public_artifacts_dir }}/all/',
today=today),
descriptionDone='Move artifacs',
))
c['builders'] = []
c['builders'].append(util.BuilderConfig(
name="x86_64",
workernames=[
{% for buildslave in x86_64_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(util.BuilderConfig(
name="i386",
workernames=[
{% for buildslave in i386_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(util.BuilderConfig(
name="all",
workernames=[
{% for buildslave in buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
####### 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'] = []
## Email notifications
from buildbot.plugins import reporters
{% raw %}
email_template = u'''
<h4>Build status: {{ summary }}</h4>
<table cellspacing="10">
<tr><td>Task:</td><td><b>{{ build['properties']['taskname'][0] }}</b></td></tr>
<tr><td>Item:</td><td><b>{{ build['properties']['item'][0] }}</b></td></tr>
<tr><td>Item type:</td><td><b>{{ build['properties']['item_type'][0] }}</b></td></tr>
<tr><td>Arch:</td><td><b>{{ build['properties']['arch'][0] }}</b></td></tr>
<tr><td>Worker:</td><td><b>{{ workername }}</b></td></tr>
<tr><td>Artifacts:</td><td><a href="{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}">
{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}</a></td></tr>
<tr><td>Complete logs:</td><td><a href="{{ build_url }}">{{ build_url }}</a></td></tr>
</table>
{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
<p><b>Step: {{ step['name'] }}: {{ statuses[step['results']] }}</b></p>
{% for log in step['logs'] %}
<p>Last 40 lines of <i>{{ log['name'] }}</i>:</p>
{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
<pre>
{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
{% endfor %}
</pre>
<hr/>
{% endfor %}
{% endfor %}
'''
{% endraw %}
html_message_formatter = reporters.MessageFormatter(
template=email_template,
template_type='html',
wantProperties=True,
wantSteps=True,
wantLogs=True,
ctx=dict(
statuses=util.Results,
artifacts_url="https://{{ external_hostname }}/artifacts/all",
),
)
mn = reporters.MailNotifier(
fromaddr='taskotron@fedoraproject.org',
sendToInterestedUsers=False,
subject="%(projectName)s %(result)s on {{ deployment_type }} %(builder)s",
mode=('failing', 'exception', 'warnings'),
extraRecipients=['qa-taskotron-admin-members@fedoraproject.org'],
relayhost="bastion.phx2.fedoraproject.org",
messageFormatter=html_message_formatter)
c['services'].append(mn)
## ExecDB's push-notifications
sp = reporters.HttpStatusPush(
serverUrl="{{ execdb_statuspush }}",
wantProperties=True,
wantSteps=True,
)
c['services'].append(sp)
####### PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').
c['title'] = "Taskotron"
c['titleURL'] = "https://{{ external_hostname }}/{{buildmaster_endpoint}}/"
# 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://{{ external_hostname }}/{{buildmaster_endpoint}}/"
####### WEB
c['www'] = {
'port': 8010,
'change_hook_dialects': {
'base': True,
},
'auth': util.UserPasswordAuth({
{% if deployment_type == 'dev' %}
"{{ dev_buildbot_user }}": "{{ dev_buildbot_password }}",
{% elif deployment_type == 'stg' %}
"{{ stg_buildbot_user }}": "{{ stg_buildbot_password }}",
{% elif deployment_type == 'prod' %}
"{{ prod_buildbot_user }}": "{{ prod_buildbot_password }}",
{% elif deployment_type == 'local' %}
"{{ local_buildbot_user }}": "{{ local_buildbot_password }}",
{% endif %}
}),
'authz': util.Authz(
allowRules=[
util.AnyControlEndpointMatcher(role="admins"),
],
roleMatchers=[
{% if deployment_type == 'dev' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ dev_buildbot_user }}"]),
{% elif deployment_type == 'stg' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ stg_buildbot_user }}"]),
{% elif deployment_type == 'prod' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ prod_buildbot_user }}"]),
{% elif deployment_type == 'local' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ local_buildbot_user }}"]),
{% endif %}
]
),
}
####### DB URL
c['db'] = {
# This specifies what database buildbot uses to store its state.
{% if deployment_type in ['dev', 'stg', 'prod'] %}
'db_url' : "postgresql://{{ buildmaster_db_user }}:{{ buildmaster_db_password }}@{{ buildmaster_db_host }}/{{ buildmaster_db_name }}",
{% elif deployment_type == 'local' %}
'db_url' : "postgresql://{{ local_buildmaster_db_user }}:{{ local_buildmaster_db_password }}@127.0.0.1/{{ buildmaster_db_name }}",
{% endif %}
}

View file

@ -1,474 +0,0 @@
# -*- python -*-
# ex: set filetype=python:
from buildbot.plugins import *
# This is a 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 = {}
c['buildbotNetUsageData'] = 'basic'
####### 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'] = [
{% for buildslave in buildslaves %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
worker.Worker("{{ buildslave }}", "{{ buildslave_password }}"),
{% elif deployment_type == 'local' %}
worker.Worker("{{ buildslave }}", "{{ local_buildslave_password }}"),
{% endif %}
{% endfor %}
]
# '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': {{ buildslave_port }} }}
####### SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'runtests' build
import buildbot.schedulers.basic
class JobScheduler(buildbot.schedulers.basic.BaseBasicScheduler):
def __init__(self, name, **kwargs):
buildbot.schedulers.basic.BaseBasicScheduler.__init__(self, name, **kwargs)
def getChangeFilter(self, branch, branches, change_filter, categories):
return util.ChangeFilter.fromSchedulerConstructorArgs(
change_filter=change_filter, categories=categories)
def getTimerNameForChange(self, changes):
return "only"
def getChangeClassificationsForTimer(self, sched_id, timer_name):
return self.master.db.schedulers.getChangeClassifications(sched_id)
c['schedulers'] = []
c['schedulers'].append(JobScheduler(
name="jobsched-noarch",
builderNames=["all"],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='noarch')))
c['schedulers'].append(JobScheduler(
name="jobsched-i386",
builderNames=['i386'],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='i386')))
c['schedulers'].append(JobScheduler(
name="jobsched-x86_64",
builderNames=['x86_64'],
treeStableTimer=None,
change_filter=util.ChangeFilter(project='rpmcheck',
category='x86_64')))
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["all", 'x86_64', 'i386']))
c['schedulers'].append(schedulers.ForceScheduler(
name="rpmcheck",
builderNames=["all", 'x86_64', 'i386'],
properties=[
util.StringParameter(
name='taskname',
default='rpmlint',
size=256,
),
util.StringParameter(
name='item',
default='',
size=256,
),
util.StringParameter(
name='item_type',
default='koji_build',
size=256,
),
util.StringParameter(
name='uuid',
default='',
size=256,
),
util.StringParameter(
name='arch',
default='x86_64',
size=128,
),
]))
####### RESOURCE LOCKS
#
# This is a set of resource locks to make sure that we don't have too many things
# going on on each slave at one time.
build_lock = util.WorkerLock("worker_builds",
maxCount=1)
####### 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.
factory = util.BuildFactory()
{% if deployment_type in ['local'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(steps.ShellCommand(
command="rm -rf /var/tmp/taskotron/*",
name="rm_tmp",
descriptionDone=['Clean tmp'],
))
# clean the log (see T230)
factory.addStep(steps.ShellCommand(
command=["rm", "-f", "/var/log/taskotron/taskotron.log"],
name="rm_log",
descriptionDone=['Clean log'],
))
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
# clean out /var/tmp/taskotron (see T253)
factory.addStep(steps.ShellCommand(
command=util.Interpolate("rm -rf /var/tmp/taskotron/%(prop:workername)s/*"),
name="rm_tmp",
descriptionDone='Clean tmp',
))
{% endif %}
# prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.ShellCommand(
command=util.Interpolate(
'mkdir /var/lib/taskotron/artifacts/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on slave',
haltOnFailure=True,
))
# check out the source
factory.addStep(steps.Git(
repourl=util.Property('git_repo', default=util.Interpolate(
'{{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/%(prop:taskname)s/')),
branch=util.Property('git_branch', default='{{ grokmirror_default_branch }}'),
mode='full',
method='clobber',
shallow=True,
descriptionDone='Clone task',
))
# run the runner
factory.addStep(steps.ShellCommand(
command=["runtask",
'-i', util.Interpolate('%(prop:item)s'),
'-t', util.Interpolate('%(prop:item_type)s'),
'-a', util.Interpolate('%(prop:arch)s'),
'-j', util.Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', util.Interpolate('%(prop:uuid)s'),
'.',
],
descriptionDone=[
util.Interpolate('%(prop:taskname)s on '),
util.Interpolate('%(prop:item)s (%(prop:arch)s)')
],
name='runtask',
timeout=20*60,
{% if deployment_type in ['dev', 'stg', 'prod'] %}
sigtermTime=5*60,
lazylogfiles=True,
logfiles={
'taskotron.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/taskotron.log')},
'heartbeat.log': {'filename': util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
},
{% elif deployment_type in ['local'] %}
logfiles={
'taskotron.log': {'filename': '/var/log/taskotron/taskotron.log'},
},
{% endif %}
))
# make sure minion is removed
factory.addStep(steps.ShellCommand(
command=util.Interpolate('testcloud instance remove --force taskotron-%(prop:uuid)s; true'),
descriptionDone='Remove minion',
))
# create artifacts dir on master
# and also prevent duplicated buildbot jobs
# (see https://pagure.io/taskotron/issue/273 )
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -m 0755 {{ public_artifacts_dir }}/%(prop:uuid)s/ || '
'( echo Multiple jobs with same UUID detected, aborting execution!; '
' echo See https://pagure.io/taskotron/issue/273 ; '
' exit 1 )'
),
descriptionDone='Create artifacs dir on master',
haltOnFailure=True,
))
# copy artifacts to master
factory.addStep(steps.DirectoryUpload(
workersrc=util.Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/'),
descriptionDone='Copy artifacts',
))
# save stdio from runtask step
# FIXME: worked with buildbot 0.8, later buildbots changed URLs
# factory.addStep(steps.MasterShellCommand(
# command=['curl', '-o', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/taskotron/stdio.log'),
# util.Interpolate('http://127.0.0.1/taskmaster/builders/%(prop:buildername)s/builds/'
# '%(prop:buildnumber)s/steps/runtask/logs/stdio/text')
# ],
# descriptionDone='Save runtask stdio log',
# ))
# ensure all artifacts are readable
factory.addStep(steps.MasterShellCommand(
command=['chmod', '-R', 'o+r', util.Interpolate('/srv/taskotron/artifacts/%(prop:uuid)s/')],
descriptionDone='Set file permissions',
))
# gzip artifacts
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
descriptionDone='Compress artifacs',
))
{% if deployment_type in ['local'] %}
# copy taskotron log to master
factory.addStep(steps.FileUpload(
workersrc='/var/log/taskotron/taskotron.log',
masterdest=util.Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/taskotron.log'),
mode=0644,
))
{% endif %}
# render current time when needed
import datetime
from buildbot.process.properties import renderer
@renderer
def today(props):
return datetime.datetime.now().strftime("%Y%m%d")
# move the artifacts to the correct dir on the master
factory.addStep(steps.MasterShellCommand(
command=util.Interpolate(
'mkdir -p -m 0755 {{ public_artifacts_dir }}/%(kw:today)s && '
'mkdir -p -m 0755 {{ public_artifacts_dir }}/all && '
'mv {{ public_artifacts_dir }}/%(prop:uuid)s/ {{ public_artifacts_dir }}/%(kw:today)s/ && '
'ln -s {{ public_artifacts_dir }}/%(kw:today)s/%(prop:uuid)s {{ public_artifacts_dir }}/all/',
today=today),
descriptionDone='Move artifacs',
))
c['builders'] = []
c['builders'].append(util.BuilderConfig(
name="x86_64",
workernames=[
{% for buildslave in x86_64_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(util.BuilderConfig(
name="i386",
workernames=[
{% for buildslave in i386_buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
c['builders'].append(util.BuilderConfig(
name="all",
workernames=[
{% for buildslave in buildslaves %}
"{{ buildslave }}",
{% endfor %}
],
factory=factory,
locks=[
build_lock.access('counting')
],
collapseRequests=False,
))
####### 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'] = []
## Email notifications
from buildbot.plugins import reporters
{% raw %}
email_template = u'''
<h4>Build status: {{ summary }}</h4>
<table cellspacing="10">
<tr><td>Task:</td><td><b>{{ build['properties']['taskname'][0] }}</b></td></tr>
<tr><td>Item:</td><td><b>{{ build['properties']['item'][0] }}</b></td></tr>
<tr><td>Item type:</td><td><b>{{ build['properties']['item_type'][0] }}</b></td></tr>
<tr><td>Arch:</td><td><b>{{ build['properties']['arch'][0] }}</b></td></tr>
<tr><td>Worker:</td><td><b>{{ workername }}</b></td></tr>
<tr><td>Artifacts:</td><td><a href="{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}">
{{ artifacts_url }}/{{ build['properties']['uuid'][0] }}</a></td></tr>
<tr><td>Complete logs:</td><td><a href="{{ build_url }}">{{ build_url }}</a></td></tr>
</table>
{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
<p><b>Step: {{ step['name'] }}: {{ statuses[step['results']] }}</b></p>
{% for log in step['logs'] %}
<p>Last 40 lines of <i>{{ log['name'] }}</i>:</p>
{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
<pre>
{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
{% endfor %}
</pre>
<hr/>
{% endfor %}
{% endfor %}
'''
{% endraw %}
html_message_formatter = reporters.MessageFormatter(
template=email_template,
template_type='html',
wantProperties=True,
wantSteps=True,
wantLogs=True,
ctx=dict(
statuses=util.Results,
artifacts_url="https://{{ external_hostname }}/artifacts/all",
),
)
mn = reporters.MailNotifier(
fromaddr='taskotron@fedoraproject.org',
sendToInterestedUsers=False,
subject="%(projectName)s %(result)s on {{ deployment_type }} %(builder)s",
mode=('failing', 'exception', 'warnings'),
extraRecipients=['qa-taskotron-admin-members@fedoraproject.org'],
relayhost="bastion.phx2.fedoraproject.org",
messageFormatter=html_message_formatter)
c['services'].append(mn)
## ExecDB's push-notifications
sp = reporters.HttpStatusPush(
serverUrl="{{ execdb_statuspush }}",
wantProperties=True,
wantSteps=True,
)
c['services'].append(sp)
####### PROJECT IDENTITY
# the 'title' string will appear at the top of this buildbot installation's
# home pages (linked to the 'titleURL').
c['title'] = "Taskotron"
c['titleURL'] = "https://{{ external_hostname }}/{{buildmaster_endpoint}}/"
# 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://{{ external_hostname }}/{{buildmaster_endpoint}}/"
####### WEB
c['www'] = {
'port': 8010,
'change_hook_dialects': {
'base': True,
},
'auth': util.UserPasswordAuth({
{% if deployment_type == 'dev' %}
"{{ dev_buildbot_user }}": "{{ dev_buildbot_password }}",
{% elif deployment_type == 'stg' %}
"{{ stg_buildbot_user }}": "{{ stg_buildbot_password }}",
{% elif deployment_type == 'prod' %}
"{{ prod_buildbot_user }}": "{{ prod_buildbot_password }}",
{% elif deployment_type == 'local' %}
"{{ local_buildbot_user }}": "{{ local_buildbot_password }}",
{% endif %}
}),
'authz': util.Authz(
allowRules=[
util.AnyControlEndpointMatcher(role="admins"),
],
roleMatchers=[
{% if deployment_type == 'dev' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ dev_buildbot_user }}"]),
{% elif deployment_type == 'stg' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ stg_buildbot_user }}"]),
{% elif deployment_type == 'prod' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ prod_buildbot_user }}"]),
{% elif deployment_type == 'local' %}
util.RolesFromUsername(roles=['admins'], usernames=["{{ local_buildbot_user }}"]),
{% endif %}
]
),
}
####### DB URL
c['db'] = {
# This specifies what database buildbot uses to store its state.
{% if deployment_type in ['dev', 'stg', 'prod'] %}
'db_url' : "postgresql://{{ buildmaster_db_user }}:{{ buildmaster_db_password }}@{{ buildmaster_db_host }}/{{ buildmaster_db_name }}",
{% elif deployment_type == 'local' %}
'db_url' : "postgresql://{{ local_buildmaster_db_user }}:{{ local_buildmaster_db_password }}@127.0.0.1/{{ buildmaster_db_name }}",
{% endif %}
}

View file

@ -11,20 +11,7 @@
- python3-psycopg2
- policycoreutils-python-utils
- python3-treq
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for buildmaster are installed
dnf: name={{ item }} state=present
with_items:
- buildbot
- buildbot-master
- libsemanage-python
- python-psycopg2
- policycoreutils-python-utils
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
############
when: ansible_cmdline.ostree is not defined
- name: ensure additional packages required for CI buildmaster are installed
dnf: name={{ item }} state=present

View file

@ -61,18 +61,6 @@
command: creates={{ item.dir }} buildbot-worker create-worker {{ item.dir }} {{ buildmaster }} buildslave passwd
with_items:
- '{{ slaves }}'
when: deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: create slave
become: true
become_user: '{{ item.user }}'
command: creates={{ item.dir }} buildslave create-slave {{ item.dir }} {{ buildmaster }} buildslave passwd
with_items:
- '{{ slaves|default([dict(user="", home="", dir="")]) }}'
when: deployment_type in ['prod']
############
- name: figure out which buildbot.tac.j2 file to use
set_fact: buildbot_tac_j2_file={{ item | basename }}

View file

@ -1,14 +1,14 @@
import os
from buildbot_worker.bot import Worker
from twisted.application import service
from buildslave.bot import BuildSlave
{% if deployment_type in ['local', 'qa-stg'] %}
basedir = r'/home/buildslave/slave'
basedir = '/home/buildslave/slave'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
basedir = r'{{ item.dir }}'
basedir = '{{ item.dir }}'
{% endif %}
rotateLength = 10000000
maxRotatedFiles = 10
@ -18,36 +18,36 @@ if basedir == '.':
import os.path
basedir = os.path.abspath(os.path.dirname(__file__))
# note: this line is matched against to check that this is a buildslave
# note: this line is matched against to check that this is a worker
# directory; do not edit it.
application = service.Application('buildslave')
application = service.Application('buildbot-worker')
try:
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
logfile = LogFile.fromFullPath(
os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
except ImportError:
# probably not yet twisted 8.2.0 and beyond, can't set log yet
pass
buildmaster_host = '{{ buildmaster }}'
port = 9989
{% if deployment_type in ['local', 'qa-stg', 'qa-prod'] %}
slavename = '{{ buildslave_name }}'
workername = '{{ buildslave_name }}'
passwd = '{{ buildslave_password }}'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
slavename = '{{ item.user }}'
workername = '{{ item.user }}'
passwd = '{{ buildslave_password }}'
{% endif %}
keepalive = 600
usepty = 0
umask = 0022
umask = 0o0022
maxdelay = 300
numcpus = None
allow_shutdown = None
maxretries = None
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
keepalive, usepty, umask=umask, maxdelay=maxdelay)
s = Worker(buildmaster_host, port, workername, passwd, basedir,
keepalive, umask=umask, maxdelay=maxdelay,
numcpus=numcpus, allow_shutdown=allow_shutdown,
maxRetries=maxretries)
s.setServiceParent(application)

View file

@ -1,53 +0,0 @@
import os
from buildbot_worker.bot import Worker
from twisted.application import service
{% if deployment_type in ['local', 'qa-stg'] %}
basedir = '/home/buildslave/slave'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
basedir = '{{ item.dir }}'
{% endif %}
rotateLength = 10000000
maxRotatedFiles = 10
# if this is a relocatable tac file, get the directory containing the TAC
if basedir == '.':
import os.path
basedir = os.path.abspath(os.path.dirname(__file__))
# note: this line is matched against to check that this is a worker
# directory; do not edit it.
application = service.Application('buildbot-worker')
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(
os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
buildmaster_host = '{{ buildmaster }}'
port = 9989
{% if deployment_type in ['local', 'qa-stg', 'qa-prod'] %}
workername = '{{ buildslave_name }}'
passwd = '{{ buildslave_password }}'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
workername = '{{ item.user }}'
passwd = '{{ buildslave_password }}'
{% endif %}
keepalive = 600
umask = 0o0022
maxdelay = 300
numcpus = None
allow_shutdown = None
maxretries = None
s = Worker(buildmaster_host, port, workername, passwd, basedir,
keepalive, umask=umask, maxdelay=maxdelay,
numcpus=numcpus, allow_shutdown=allow_shutdown,
maxRetries=maxretries)
s.setServiceParent(application)

View file

@ -1,53 +0,0 @@
import os
from buildbot_worker.bot import Worker
from twisted.application import service
{% if deployment_type in ['local', 'qa-stg'] %}
basedir = '/home/buildslave/slave'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
basedir = '{{ item.dir }}'
{% endif %}
rotateLength = 10000000
maxRotatedFiles = 10
# if this is a relocatable tac file, get the directory containing the TAC
if basedir == '.':
import os.path
basedir = os.path.abspath(os.path.dirname(__file__))
# note: this line is matched against to check that this is a worker
# directory; do not edit it.
application = service.Application('buildbot-worker')
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath(
os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
buildmaster_host = '{{ buildmaster }}'
port = 9989
{% if deployment_type in ['local', 'qa-stg', 'qa-prod'] %}
workername = '{{ buildslave_name }}'
passwd = '{{ buildslave_password }}'
{% endif %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
workername = '{{ item.user }}'
passwd = '{{ buildslave_password }}'
{% endif %}
keepalive = 600
umask = 0o0022
maxdelay = 300
numcpus = None
allow_shutdown = None
maxretries = None
s = Worker(buildmaster_host, port, workername, passwd, basedir,
keepalive, umask=umask, maxdelay=maxdelay,
numcpus=numcpus, allow_shutdown=allow_shutdown,
maxRetries=maxretries)
s.setServiceParent(application)

View file

@ -6,8 +6,8 @@ After=network.target
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/buildslave/slave/twistd.pid
ExecStart=/bin/buildslave start /home/buildslave/slave/
ExecStop=/bin/buildslave stop /home/buildslave/slave/
ExecStart=/usr/bin/buildbot-worker start /home/buildslave/slave/
ExecStop=/usr/bin/buildbot-worker stop /home/buildslave/slave/
User=buildslave
Group=buildslave

View file

@ -1,15 +0,0 @@
[Unit]
Description=Buildslave for taskbot
After=network.target
[Service]
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/buildslave/slave/twistd.pid
ExecStart=/usr/bin/buildbot-worker start /home/buildslave/slave/
ExecStop=/usr/bin/buildbot-worker stop /home/buildslave/slave/
User=buildslave
Group=buildslave
[Install]
WantedBy=multi-user.target

View file

@ -1,15 +0,0 @@
[Unit]
Description=Buildslave for taskbot
After=network.target
[Service]
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/buildslave/slave/twistd.pid
ExecStart=/usr/bin/buildbot-worker start /home/buildslave/slave/
ExecStop=/usr/bin/buildbot-worker stop /home/buildslave/slave/
User=buildslave
Group=buildslave
[Install]
WantedBy=multi-user.target

View file

@ -6,8 +6,8 @@ After=network.target
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/%i/slave/twistd.pid
ExecStart=/bin/buildslave start /srv/buildslaves/%i/slave/
ExecStop=/bin/buildslave stop /srv/buildslaves/%i/slave/
ExecStart=/usr/bin/buildbot-worker start /srv/buildslaves/%i/slave/
ExecStop=/usr/bin/buildbot-worker stop /srv/buildslaves/%i/slave/
User=%i
Group={{ slaves_group }}

View file

@ -1,15 +0,0 @@
[Unit]
Description=Buildslave for taskotron
After=network.target
[Service]
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/%i/slave/twistd.pid
ExecStart=/usr/bin/buildbot-worker start /srv/buildslaves/%i/slave/
ExecStop=/usr/bin/buildbot-worker stop /srv/buildslaves/%i/slave/
User=%i
Group={{ slaves_group }}
[Install]
WantedBy=multi-user.target

View file

@ -1,15 +0,0 @@
[Unit]
Description=Buildslave for taskotron
After=network.target
[Service]
Type=forking
# disabled because of https://pagure.io/taskotron/issue/236
#PIDFile=/home/%i/slave/twistd.pid
ExecStart=/usr/bin/buildbot-worker start /srv/buildslaves/%i/slave/
ExecStop=/usr/bin/buildbot-worker stop /srv/buildslaves/%i/slave/
User=%i
Group={{ slaves_group }}
[Install]
WantedBy=multi-user.target

View file

@ -5,18 +5,7 @@
- buildbot-worker
- git
- policycoreutils-python-utils
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for buildslave are installed
dnf: name={{ item }} state=present
with_items:
- buildbot-slave
- git
- policycoreutils-python-utils
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
############
when: ansible_cmdline.ostree is not defined
- name: ensure packages required for CI buildslave are installed
dnf: name={{ item }} state=present

View file

@ -9,19 +9,7 @@
- python3-mod_wsgi
- python3-psycopg2
- python2-libsemanage
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for execdb are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- execdb
- mod_wsgi
- python-psycopg2
- libsemanage-python
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
###########
when: ansible_cmdline.ostree is not defined
- name: ensure database is created
delegate_to: "{{ execdb_db_host_machine }}"

View file

@ -9,19 +9,7 @@
- python3-mod_wsgi
- python3-psycopg2
- python2-libsemanage
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for resultsdb are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- resultsdb
- mod_wsgi
- python-psycopg2
- libsemanage-python
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
###########
when: ansible_cmdline.ostree is not defined
- name: ensure database is created
delegate_to: "{{ resultsdb_db_host_machine }}"

View file

@ -7,17 +7,7 @@
with_items:
- resultsdb_frontend
- python3-mod_wsgi
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for resultsdb_frontend are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- resultsdb_frontend
- mod_wsgi
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
###########
when: ansible_cmdline.ostree is not defined
- name: ensure selinux lets httpd talk to the network
seboolean: name=httpd_can_network_connect persistent=yes state=yes

View file

@ -28,29 +28,6 @@ users:
chpasswd: { expire: False }
ssh-authorized-keys:
- {{ buildslave_pubkey }}
write_files:
- encoding: b64
content: 'W2luZnJhc3RydWN0dXJlLXRhZ3NdCm5hbWU9RmVkb3JhIEluZnJhc3RydWN0dXJlIHRhZyAkcmVsZWFzZXZlciAtICRiYXNlYXJjaApiYXNldXJsPWh0dHA6Ly9pbmZyYXN0cnVjdHVyZS5mZWRvcmFwcm9qZWN0Lm9yZy9yZXBvL2luZnJhL2YkcmVsZWFzZXZlci1pbmZyYS8kYmFzZWFyY2gvCmVuYWJsZWQ9MQpncGdjaGVjaz0xCmdwZ2tleT1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcmVwby9pbmZyYS9SUE0tR1BHLUtFWS1JTkZSQS1UQUdTCg=='
owner: root:root
path: /etc/yum.repos.d/infra-tags.repo
permissions: '0644'
{% if deployment_type in ['local'] %}
- encoding: b64
content: 'W2ZlZG9yYV0KbmFtZT1GZWRvcmEgJHJlbGVhc2V2ZXIgLSAkYmFzZWFyY2gKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC9yZWxlYXNlcy8kcmVsZWFzZXZlci9FdmVyeXRoaW5nLyRiYXNlYXJjaC9vcy8KI21ldGFsaW5rPWh0dHBzOi8vbWlycm9ycy5mZWRvcmFwcm9qZWN0Lm9yZy9tZXRhbGluaz9yZXBvPWZlZG9yYS0kcmVsZWFzZXZlciZhcmNoPSRiYXNlYXJjaAplbmFibGVkPTEKbWV0YWRhdGFfZXhwaXJlPTdkCmdwZ2NoZWNrPTAKZ3Bna2V5PWZpbGU6Ly8vZXRjL3BraS9ycG0tZ3BnL1JQTS1HUEctS0VZLWZlZG9yYS0kcmVsZWFzZXZlci0kYmFzZWFyY2gKCltmZWRvcmEtZGVidWdpbmZvXQpuYW1lPUZlZG9yYSAkcmVsZWFzZXZlciAtICRiYXNlYXJjaCAtIERlYnVnCmZhaWxvdmVybWV0aG9kPXByaW9yaXR5CmJhc2V1cmw9aHR0cDovL2luZnJhc3RydWN0dXJlLmZlZG9yYXByb2plY3Qub3JnL3B1Yi9mZWRvcmEvbGludXgvcmVsZWFzZXMvJHJlbGVhc2V2ZXIvRXZlcnl0aGluZy8kYmFzZWFyY2gvZGVidWcvCiNtZXRhbGluaz1odHRwczovL21pcnJvcnMuZmVkb3JhcHJvamVjdC5vcmcvbWV0YWxpbms/cmVwbz1mZWRvcmEtZGVidWctJHJlbGVhc2V2ZXImYXJjaD0kYmFzZWFyY2gKZW5hYmxlZD0wCm1ldGFkYXRhX2V4cGlyZT03ZApncGdjaGVjaz0xCmdwZ2tleT1maWxlOi8vL2V0Yy9wa2kvcnBtLWdwZy9SUE0tR1BHLUtFWS1mZWRvcmEtJHJlbGVhc2V2ZXItJGJhc2VhcmNoCgpbZmVkb3JhLXNvdXJjZV0KbmFtZT1GZWRvcmEgJHJlbGVhc2V2ZXIgLSBTb3VyY2UKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC9yZWxlYXNlcy8kcmVsZWFzZXZlci9FdmVyeXRoaW5nL3NvdXJjZS9TUlBNUy8KI21ldGFsaW5rPWh0dHBzOi8vbWlycm9ycy5mZWRvcmFwcm9qZWN0Lm9yZy9tZXRhbGluaz9yZXBvPWZlZG9yYS1zb3VyY2UtJHJlbGVhc2V2ZXImYXJjaD0kYmFzZWFyY2gKZW5hYmxlZD0wCm1ldGFkYXRhX2V4cGlyZT03ZApncGdjaGVjaz0xCmdwZ2tleT1maWxlOi8vL2V0Yy9wa2kvcnBtLWdwZy9SUE0tR1BHLUtFWS1mZWRvcmEtJHJlbGVhc2V2ZXItJGJhc2VhcmNoCg=='
owner: root:root
path: /etc/yum.repos.d/fedora.repo
permissions: '0644'
- encoding: b64
content: 'W3VwZGF0ZXNdCm5hbWU9RmVkb3JhICRyZWxlYXNldmVyIC0gJGJhc2VhcmNoIC0gVXBkYXRlcwpmYWlsb3Zlcm1ldGhvZD1wcmlvcml0eQpiYXNldXJsPWh0dHA6Ly9pbmZyYXN0cnVjdHVyZS5mZWRvcmFwcm9qZWN0Lm9yZy9wdWIvZmVkb3JhL2xpbnV4L3VwZGF0ZXMvJHJlbGVhc2V2ZXIvJGJhc2VhcmNoLwojbWV0YWxpbms9aHR0cHM6Ly9taXJyb3JzLmZlZG9yYXByb2plY3Qub3JnL21ldGFsaW5rP3JlcG89dXBkYXRlcy1yZWxlYXNlZC1mJHJlbGVhc2V2ZXImYXJjaD0kYmFzZWFyY2gKZW5hYmxlZD0xCmdwZ2NoZWNrPTEKZ3Bna2V5PWZpbGU6Ly8vZXRjL3BraS9ycG0tZ3BnL1JQTS1HUEctS0VZLWZlZG9yYS0kcmVsZWFzZXZlci0kYmFzZWFyY2gKClt1cGRhdGVzLWRlYnVnaW5mb10KbmFtZT1GZWRvcmEgJHJlbGVhc2V2ZXIgLSAkYmFzZWFyY2ggLSBVcGRhdGVzIC0gRGVidWcKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC91cGRhdGVzLyRyZWxlYXNldmVyLyRiYXNlYXJjaC9kZWJ1Zy8KI21ldGFsaW5rPWh0dHBzOi8vbWlycm9ycy5mZWRvcmFwcm9qZWN0Lm9yZy9tZXRhbGluaz9yZXBvPXVwZGF0ZXMtcmVsZWFzZWQtZGVidWctZiRyZWxlYXNldmVyJmFyY2g9JGJhc2VhcmNoCmVuYWJsZWQ9MApncGdjaGVjaz0xCmdwZ2tleT1maWxlOi8vL2V0Yy9wa2kvcnBtLWdwZy9SUE0tR1BHLUtFWS1mZWRvcmEtJHJlbGVhc2V2ZXItJGJhc2VhcmNoCgpbdXBkYXRlcy1zb3VyY2VdCm5hbWU9RmVkb3JhICRyZWxlYXNldmVyIC0gVXBkYXRlcyBTb3VyY2UKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC91cGRhdGVzLyRyZWxlYXNldmVyL1NSUE1TLwojbWV0YWxpbms9aHR0cHM6Ly9taXJyb3JzLmZlZG9yYXByb2plY3Qub3JnL21ldGFsaW5rP3JlcG89dXBkYXRlcy1yZWxlYXNlZC1zb3VyY2UtZiRyZWxlYXNldmVyJmFyY2g9JGJhc2VhcmNoCmVuYWJsZWQ9MApncGdjaGVjaz0xCmdwZ2tleT1maWxlOi8vL2V0Yy9wa2kvcnBtLWdwZy9SUE0tR1BHLUtFWS1mZWRvcmEtJHJlbGVhc2V2ZXItJGJhc2VhcmNoCg=='
owner: root:root
path: /etc/yum.repos.d/fedora-updates.repo
permissions: '0644'
- encoding: b64
content: 'W3VwZGF0ZXMtdGVzdGluZ10KbmFtZT1GZWRvcmEgJHJlbGVhc2V2ZXIgLSAkYmFzZWFyY2ggLSBUZXN0IFVwZGF0ZXMKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC91cGRhdGVzL3Rlc3RpbmcvJHJlbGVhc2V2ZXIvJGJhc2VhcmNoLwojbWV0YWxpbms9aHR0cHM6Ly9taXJyb3JzLmZlZG9yYXByb2plY3Qub3JnL21ldGFsaW5rP3JlcG89dXBkYXRlcy10ZXN0aW5nLWYkcmVsZWFzZXZlciZhcmNoPSRiYXNlYXJjaAplbmFibGVkPTAKZ3BnY2hlY2s9MQpncGdrZXk9ZmlsZTovLy9ldGMvcGtpL3JwbS1ncGcvUlBNLUdQRy1LRVktZmVkb3JhLSRyZWxlYXNldmVyLSRiYXNlYXJjaAoKW3VwZGF0ZXMtdGVzdGluZy1kZWJ1Z2luZm9dCm5hbWU9RmVkb3JhICRyZWxlYXNldmVyIC0gJGJhc2VhcmNoIC0gVGVzdCBVcGRhdGVzIERlYnVnCmZhaWxvdmVybWV0aG9kPXByaW9yaXR5CmJhc2V1cmw9aHR0cDovL2luZnJhc3RydWN0dXJlLmZlZG9yYXByb2plY3Qub3JnL3B1Yi9mZWRvcmEvbGludXgvdXBkYXRlcy90ZXN0aW5nLyRyZWxlYXNldmVyLyRiYXNlYXJjaC9kZWJ1Zy8KI21ldGFsaW5rPWh0dHBzOi8vbWlycm9ycy5mZWRvcmFwcm9qZWN0Lm9yZy9tZXRhbGluaz9yZXBvPXVwZGF0ZXMtdGVzdGluZy1kZWJ1Zy1mJHJlbGVhc2V2ZXImYXJjaD0kYmFzZWFyY2gKZW5hYmxlZD0wCmdwZ2NoZWNrPTEKZ3Bna2V5PWZpbGU6Ly8vZXRjL3BraS9ycG0tZ3BnL1JQTS1HUEctS0VZLWZlZG9yYS0kcmVsZWFzZXZlci0kYmFzZWFyY2gKClt1cGRhdGVzLXRlc3Rpbmctc291cmNlXQpuYW1lPUZlZG9yYSAkcmVsZWFzZXZlciAtIFRlc3QgVXBkYXRlcyBTb3VyY2UKZmFpbG92ZXJtZXRob2Q9cHJpb3JpdHkKYmFzZXVybD1odHRwOi8vaW5mcmFzdHJ1Y3R1cmUuZmVkb3JhcHJvamVjdC5vcmcvcHViL2ZlZG9yYS9saW51eC91cGRhdGVzL3Rlc3RpbmcvJHJlbGVhc2V2ZXIvU1JQTVMvCiNtZXRhbGluaz1odHRwczovL21pcnJvcnMuZmVkb3JhcHJvamVjdC5vcmcvbWV0YWxpbms/cmVwbz11cGRhdGVzLXRlc3Rpbmctc291cmNlLWYkcmVsZWFzZXZlciZhcmNoPSRiYXNlYXJjaAplbmFibGVkPTAKZ3BnY2hlY2s9MQpncGdrZXk9ZmlsZTovLy9ldGMvcGtpL3JwbS1ncGcvUlBNLUdQRy1LRVktZmVkb3JhLSRyZWxlYXNldmVyLSRiYXNlYXJjaAo='
owner: root:root
path: /etc/yum.repos.d/fedora-updates-testing.repo
permissions: '0644'
{% endif %}
runcmd:
- [dnf, update, libtaskotron, python-resultsdb_api]
"""

View file

@ -1,57 +0,0 @@
# Commented out default values with details are displayed below. To override
# these default values, uncomment the values, rename the file to settings.py
# and place it in a supported config location
# Do not modify this file directly, it will not be picked up unless the filename
# is changed to settings.py
#DOWNLOAD_PROGRESS = True
#LOG_FILE = None
# Directories for data and cached downloaded images
#DATA_DIR = "/var/lib/testcloud/"
#STORE_DIR = "/var/lib/testcloud/backingstores"
# Data for cloud-init
#PASSWORD = 'passw0rd'
#HOSTNAME = 'testcloud'
#META_DATA = """instance-id: iid-123456
#local-hostname: %s
#"""
USER_DATA = """#cloud-config
users:
- default
- name: root
password: %s
chpasswd: { expire: False }
ssh-authorized-keys:
- {{ buildslave_pubkey }}
runcmd:
- [dnf, update, libtaskotron, python-resultsdb_api]
"""
#ATOMIC_USER_DATA = """#cloud-config
#password: %s
#chpasswd: { expire: False }
#ssh_pwauth: True
#runcmd:
# - [ sh, -c, 'echo -e "ROOT_SIZE=4G\nDATA_SIZE=10G" > /etc/sysconfig/docker-storage-setup']
#"""
#
# Extra cmdline args for the qemu invocation.
# Customize as needed :)
#CMD_LINE_ARGS = []
# The timeout, in seconds, to wait for an instance to boot before
# failing the boot process. Setting this to 0 disables waiting and
# returns immediately after starting the boot process.
BOOT_TIMEOUT = 90
# ram size, in MiB
RAM = 6144
# Desired size, in GiB of instance disks. 0 leaves disk capacity
# identical to source image
DISK_SIZE = 40

View file

@ -1,57 +0,0 @@
# Commented out default values with details are displayed below. To override
# these default values, uncomment the values, rename the file to settings.py
# and place it in a supported config location
# Do not modify this file directly, it will not be picked up unless the filename
# is changed to settings.py
#DOWNLOAD_PROGRESS = True
#LOG_FILE = None
# Directories for data and cached downloaded images
#DATA_DIR = "/var/lib/testcloud/"
#STORE_DIR = "/var/lib/testcloud/backingstores"
# Data for cloud-init
#PASSWORD = 'passw0rd'
#HOSTNAME = 'testcloud'
#META_DATA = """instance-id: iid-123456
#local-hostname: %s
#"""
USER_DATA = """#cloud-config
users:
- default
- name: root
password: %s
chpasswd: { expire: False }
ssh-authorized-keys:
- {{ buildslave_pubkey }}
runcmd:
- [dnf, update, libtaskotron, python-resultsdb_api]
"""
#ATOMIC_USER_DATA = """#cloud-config
#password: %s
#chpasswd: { expire: False }
#ssh_pwauth: True
#runcmd:
# - [ sh, -c, 'echo -e "ROOT_SIZE=4G\nDATA_SIZE=10G" > /etc/sysconfig/docker-storage-setup']
#"""
#
# Extra cmdline args for the qemu invocation.
# Customize as needed :)
#CMD_LINE_ARGS = []
# The timeout, in seconds, to wait for an instance to boot before
# failing the boot process. Setting this to 0 disables waiting and
# returns immediately after starting the boot process.
BOOT_TIMEOUT = 90
# ram size, in MiB
RAM = 6144
# Desired size, in GiB of instance disks. 0 leaves disk capacity
# identical to source image
DISK_SIZE = 40

View file

@ -64,7 +64,7 @@
<div class="vfill-120"></div>
<p>
<a class="btn btn-lg btn-primary hvr-fade" href="/{{ resultsdb_fe_endpoint }}/results" role="button">Browse Task Results</a>
<a class="btn btn-lg btn-primary hvr-fade" href="/taskmaster/waterfall" role="button">Recently Executed Tasks</a>
<a class="btn btn-lg btn-primary hvr-fade" href="/taskmaster/#/builders" role="button">Recently Executed Tasks</a>
<a class="btn btn-lg btn-primary hvr-fade" href="https://qa.fedoraproject.org/docs/libtaskotron/latest" role="button">Documentation</a>
</p>
</div>

View file

@ -1,184 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Landing page for the Fedora QA Taskotron instance.">
<meta name="author" content="Fedora QA">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="static/css/style.css">
<title>Taskotron {{ landingpage_title }}</title>
<link rel="icon" type="image/png" href="static/img/favicon.png">
</head>
<body>
<nav class="navbar navbar-default navbar-static-top navbar-dark">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="dropdown">
<a class="navbar-brand {{landingpage_title|lower}} dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
{{landingpage_title}} Instance
<span class="caret"></span>
</a>
<ul class="dropdown-menu" style="top: 30px;">
{% for instance in instances %}
<li><a href="{{instance.url}}">{{instance.name}} Instance</a></li>
{% endfor %}
</ul>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse navbar-dark">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://fedoraproject.org/wiki/Taskotron">Wiki</a></li>
<li><a href="https://pagure.io/taskotron">Issue Tracker</a></li>
<li><a href="https://fedoraproject.org/wiki/Taskotron/Tasks">Information about Tasks</a></li>
</ul>
</div>
</div>
</nav>
<div class="bg fullpage">
<div class="jumbotron text-center">
<div class="container">
<div class="vfill-40"></div>
<img src="static/img/taskotron-{{landingpage_instance}}.svg" class="img-responsive center-block logo">
<div class="vfill-120"></div>
<p class="punchline">automated task execution framework</p>
<div class="vfill-120"></div>
<p>
<a class="btn btn-lg btn-primary hvr-fade" href="/{{ resultsdb_fe_endpoint }}/results" role="button">Browse Task Results</a>
<a class="btn btn-lg btn-primary hvr-fade" href="/taskmaster/#/builders" role="button">Recently Executed Tasks</a>
<a class="btn btn-lg btn-primary hvr-fade" href="https://qa.fedoraproject.org/docs/libtaskotron/latest" role="button">Documentation</a>
</p>
</div>
</div>
</div>
<div class="container">
<div class="row vertical-center">
<div class="col-md-9">
<h2>Trivial local execution</h2><p class="text-muted">No need to replicate the production environment with all its servers and configurations, the check authors can easily run and develop their checks on their local machine with no unnecessary software setup hassle.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-desktop"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-bar-chart"></i></div>
</div>
<div class="col-md-9">
<h2>Simple check management</h2><p class="text-muted">Package maintainers in full control of their package-related checks, no hurdles.</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Support for package-related checks</h2><p class="text-muted">Can this new build of firefox package be safely updated? Do the functional tests pass for this new build of openssh?</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-cubes"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-globe"></i></div>
</div>
<div class="col-md-9">
<h2>Support for distribution-wide checks</h2><p class="text-muted">Can this set of packages be pushed to stable? Is this new system compose installable?</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Event-based</h2><p class="text-muted">Where applicable only the simplest interaction between services is used - passing messages through a message bus - for both check triggering and result reporting. No hardcoded tie-ins to specific services.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-paper-plane"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-puzzle-piece"></i></div>
</div>
<div class="col-md-9">
<h2>Decoupled design</h2><p class="text-muted">Comprised of loosely-coupled standalone units (tools, libraries) so that important logical functions are separated and one unit can be replaced with a different unit with similar functionality.</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Open source rockstar</h2><p class="text-muted">Taskotron is under active development. If you're interested in contributing, check out our <a href="{{ taskotron_docs_url }}/devguide.html">development guide</a> and the tickets and tasks on our <a href="https://pagure.io/taskotron">project page</a><!--, or pick some <a href="https://phab.qa.fedoraproject.org/project/board/12/">easy to handle tasks</a> -->.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-code-fork"></i></div>
</div>
</div>
</div>
<footer class="fullpage">
<div class="container text-center">
<div class="punchline">Get in touch!</div>
<div class="vfill-120"></div>
<p class="text-muted">Email on <a href="https://lists.fedoraproject.org/archives/list/qa-devel@lists.fedoraproject.org/">The Fedora qa-devel list</a></p>
<p class="text-muted">In #fedora-qa on <a href="https://webchat.freenode.net/">Freenode IRC</a></p>
<p class="text-muted">Check the <a href="https://pagure.io/taskotron">Pagure</a></p>
<div class="vfill-120"></div>
<img src="static/img/taskotron-box.svg">
</div>
</footer>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script>
<script>
fedmenu({
'url': 'https://apps.fedoraproject.org/js/data.js',
'mimeType': 'application/javascript',
'position': 'bottom-right',
});
</script>
</html>

View file

@ -1,184 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Landing page for the Fedora QA Taskotron instance.">
<meta name="author" content="Fedora QA">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="static/css/style.css">
<title>Taskotron {{ landingpage_title }}</title>
<link rel="icon" type="image/png" href="static/img/favicon.png">
</head>
<body>
<nav class="navbar navbar-default navbar-static-top navbar-dark">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="dropdown">
<a class="navbar-brand {{landingpage_title|lower}} dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
{{landingpage_title}} Instance
<span class="caret"></span>
</a>
<ul class="dropdown-menu" style="top: 30px;">
{% for instance in instances %}
<li><a href="{{instance.url}}">{{instance.name}} Instance</a></li>
{% endfor %}
</ul>
</div>
</div>
<div id="navbar" class="navbar-collapse collapse navbar-dark">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://fedoraproject.org/wiki/Taskotron">Wiki</a></li>
<li><a href="https://pagure.io/taskotron">Issue Tracker</a></li>
<li><a href="https://fedoraproject.org/wiki/Taskotron/Tasks">Information about Tasks</a></li>
</ul>
</div>
</div>
</nav>
<div class="bg fullpage">
<div class="jumbotron text-center">
<div class="container">
<div class="vfill-40"></div>
<img src="static/img/taskotron-{{landingpage_instance}}.svg" class="img-responsive center-block logo">
<div class="vfill-120"></div>
<p class="punchline">automated task execution framework</p>
<div class="vfill-120"></div>
<p>
<a class="btn btn-lg btn-primary hvr-fade" href="/{{ resultsdb_fe_endpoint }}/results" role="button">Browse Task Results</a>
<a class="btn btn-lg btn-primary hvr-fade" href="/taskmaster/#/builders" role="button">Recently Executed Tasks</a>
<a class="btn btn-lg btn-primary hvr-fade" href="https://qa.fedoraproject.org/docs/libtaskotron/latest" role="button">Documentation</a>
</p>
</div>
</div>
</div>
<div class="container">
<div class="row vertical-center">
<div class="col-md-9">
<h2>Trivial local execution</h2><p class="text-muted">No need to replicate the production environment with all its servers and configurations, the check authors can easily run and develop their checks on their local machine with no unnecessary software setup hassle.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-desktop"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-bar-chart"></i></div>
</div>
<div class="col-md-9">
<h2>Simple check management</h2><p class="text-muted">Package maintainers in full control of their package-related checks, no hurdles.</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Support for package-related checks</h2><p class="text-muted">Can this new build of firefox package be safely updated? Do the functional tests pass for this new build of openssh?</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-cubes"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-globe"></i></div>
</div>
<div class="col-md-9">
<h2>Support for distribution-wide checks</h2><p class="text-muted">Can this set of packages be pushed to stable? Is this new system compose installable?</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Event-based</h2><p class="text-muted">Where applicable only the simplest interaction between services is used - passing messages through a message bus - for both check triggering and result reporting. No hardcoded tie-ins to specific services.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-paper-plane"></i></div>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-3">
<div class="featurette text-left" style="color: #639a81;">
<i class="fa fa-puzzle-piece"></i></div>
</div>
<div class="col-md-9">
<h2>Decoupled design</h2><p class="text-muted">Comprised of loosely-coupled standalone units (tools, libraries) so that important logical functions are separated and one unit can be replaced with a different unit with similar functionality.</p>
</div>
</div>
<hr>
<div class="row vertical-center">
<div class="col-md-9">
<h2>Open source rockstar</h2><p class="text-muted">Taskotron is under active development. If you're interested in contributing, check out our <a href="{{ taskotron_docs_url }}/devguide.html">development guide</a> and the tickets and tasks on our <a href="https://pagure.io/taskotron">project page</a><!--, or pick some <a href="https://phab.qa.fedoraproject.org/project/board/12/">easy to handle tasks</a> -->.</p>
</div>
<div class="col-md-3">
<div class="featurette text-right" style="color: #cc8f60;">
<i class="fa fa-code-fork"></i></div>
</div>
</div>
</div>
<footer class="fullpage">
<div class="container text-center">
<div class="punchline">Get in touch!</div>
<div class="vfill-120"></div>
<p class="text-muted">Email on <a href="https://lists.fedoraproject.org/archives/list/qa-devel@lists.fedoraproject.org/">The Fedora qa-devel list</a></p>
<p class="text-muted">In #fedora-qa on <a href="https://webchat.freenode.net/">Freenode IRC</a></p>
<p class="text-muted">Check the <a href="https://pagure.io/taskotron">Pagure</a></p>
<div class="vfill-120"></div>
<img src="static/img/taskotron-box.svg">
</div>
</footer>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script>
<script>
fedmenu({
'url': 'https://apps.fedoraproject.org/js/data.js',
'mimeType': 'application/javascript',
'position': 'bottom-right',
});
</script>
</html>

View file

@ -5,7 +5,6 @@
- fedmsg
- fedmsg-hub
- taskotron-trigger
- python2-resultsdb_api # TODO: remove when transition to buildbot 1.7 is complete
- python3-resultsdb_api
when: ansible_cmdline.ostree is not defined
@ -16,19 +15,6 @@
- trigger.cfg.j2
notify:
- restart fedmsg-hub-3
when: deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: generate trigger configuration
template: src={{ item }} dest=/etc/taskotron/trigger.cfg owner=root group=root mode=0744
with_first_found:
- trigger.cfg.j2.{{ deployment_type }}
- trigger.cfg.j2
notify:
- restart fedmsg-hub
when: deployment_type in ['prod']
###########
- name: generate trigger rules
template: src={{ item }} dest=/etc/taskotron/trigger_rules.yml owner=root group=root mode=0744
@ -37,34 +23,11 @@
- trigger_rules.yml.j2
notify:
- restart fedmsg-hub-3
when: deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: generate trigger rules
template: src={{ item }} dest=/etc/taskotron/trigger_rules.yml owner=root group=root mode=0744
with_first_found:
- trigger_rules.yml.j2.{{ deployment_type }}
- trigger_rules.yml.j2
notify:
- restart fedmsg-hub
when: deployment_type in ['prod']
#########
- name: copy fedmsg logging configuration
copy: src=logging.py dest=/etc/fedmsg.d/logging.py owner=root group=root mode=0744
notify:
- restart fedmsg-hub-3
when: deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: copy fedmsg logging configuration
copy: src=logging.py dest=/etc/fedmsg.d/logging.py owner=root group=root mode=0744
notify:
- restart fedmsg-hub
when: deployment_type in ['prod']
###########
- name: install fetch_activity
copy: src=fetch_activity.py dest=/root/fetch_activity.py owner=root group=root mode=0644
@ -82,11 +45,3 @@
- name: start and enable fedmsg-hub-3 service
service: name=fedmsg-hub-3 enabled=yes state=started
when: deployment_type in ['dev', 'stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: start and enable fedmsg-hub service
service: name=fedmsg-hub enabled=yes state=started
when: deployment_type in ['prod']
###########

View file

@ -1,5 +1,5 @@
[buildbot]
url = http://127.0.0.1:8080/change_hook
url = http://127.0.0.1:8010/change_hook
[trigger]
valid_arches = x86_64,armhfp

View file

@ -1,23 +0,0 @@
[buildbot]
url = http://127.0.0.1:8010/change_hook
[trigger]
valid_arches = x86_64,armhfp
koji_url = http://koji.fedoraproject.org/kojihub
datagrepper_url = https://apps.fedoraproject.org/datagrepper/raw
execdb_server = {{ execdb_server }}
runner_type = BuildbotRunner
job_logging = True
joblog_file = {{ trigger_joblog_file }}
fuse_delay = 900 ; 15 minutes in seconds
git_cache_dir = {{ trigger_cache_dir }}
rules_template = {{ trigger_rules_template_path }}
{# enable this if you want taskotron-stg to react to just stg fedmsgs
{% if deployment_type in ['stg'] %}
deployment_type = stg
{% endif%}
#}
[koji_build_completed]
; critpath_filepath = {{ trigger_critpath_file }}
critpath_filepath =

View file

@ -1,23 +0,0 @@
[buildbot]
url = http://127.0.0.1:8010/change_hook
[trigger]
valid_arches = x86_64,armhfp
koji_url = http://koji.fedoraproject.org/kojihub
datagrepper_url = https://apps.fedoraproject.org/datagrepper/raw
execdb_server = {{ execdb_server }}
runner_type = BuildbotRunner
job_logging = True
joblog_file = {{ trigger_joblog_file }}
fuse_delay = 900 ; 15 minutes in seconds
git_cache_dir = {{ trigger_cache_dir }}
rules_template = {{ trigger_rules_template_path }}
{# enable this if you want taskotron-stg to react to just stg fedmsgs
{% if deployment_type in ['stg'] %}
deployment_type = stg
{% endif%}
#}
[koji_build_completed]
; critpath_filepath = {{ trigger_critpath_file }}
critpath_filepath =

View file

@ -10,19 +10,7 @@
- python3-psycopg2
- python3-flask-oidc
- python2-libsemanage
when: ansible_cmdline.ostree is not defined and deployment_type in ['dev', stg']
###########
## TODO: remove when transition to buildbot 1.7 is complete
- name: ensure packages required for vault are installed (dnf)
dnf: name={{ item }} state=present
with_items:
- vault
- mod_wsgi
- python-psycopg2
- libsemanage-python
when: ansible_cmdline.ostree is not defined and deployment_type in ['prod']
###########
when: ansible_cmdline.ostree is not defined
- name: ensure database is created
delegate_to: "{{ vault_db_host_machine }}"