diff --git a/inventory/group_vars/taskotron-prod-client-hosts b/inventory/group_vars/taskotron-prod-client-hosts
index 1af3fb65f1..0f2eb8f443 100644
--- a/inventory/group_vars/taskotron-prod-client-hosts
+++ b/inventory/group_vars/taskotron-prod-client-hosts
@@ -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
diff --git a/inventory/host_vars/resultsdb01.qa.fedoraproject.org b/inventory/host_vars/resultsdb01.qa.fedoraproject.org
index 89623efa5e..029f7513c8 100644
--- a/inventory/host_vars/resultsdb01.qa.fedoraproject.org
+++ b/inventory/host_vars/resultsdb01.qa.fedoraproject.org
@@ -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"
-
-
diff --git a/inventory/host_vars/taskotron01.qa.fedoraproject.org b/inventory/host_vars/taskotron01.qa.fedoraproject.org
index 67cde31ea8..e107750d9d 100644
--- a/inventory/host_vars/taskotron01.qa.fedoraproject.org
+++ b/inventory/host_vars/taskotron01.qa.fedoraproject.org
@@ -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
diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2 b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2
index e66f09314c..2669241a09 100644
--- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2
+++ b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2
@@ -1,263 +1,278 @@
# -*- 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'] = [
- {% 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 }}"),
- {% 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
+####### 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['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'] = []
c['schedulers'].append(JobScheduler(
- name="jobsched-noarch",
- builderNames=["all"],
- treeStableTimer=None,
- change_filter=filter.ChangeFilter(project='rpmcheck',
- category='noarch')))
+ 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=filter.ChangeFilter(project='rpmcheck',
- category='i386')))
+ 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=filter.ChangeFilter(project='rpmcheck',
- category='x86_64')))
+ name="jobsched-x86_64",
+ builderNames=['x86_64'],
+ treeStableTimer=None,
+ 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(
- name="force",
- builderNames=["all", 'x86_64', 'i386']))
-c['schedulers'].append(ForceScheduler(
- name="rpmcheck",
- builderNames=["all", 'x86_64', 'i386'],
- 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)]))
+c['schedulers'].append(schedulers.ForceScheduler(
+ name="force",
+ builderNames=["all", 'x86_64', 'i386']))
-{% 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')))
+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,
+ ),
+ ]))
-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 }}'),
- mode='full',
- method='clobber',
- shallow=True,
- descriptionDone='Clone task'))
+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(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)')],
- name='runtask',
- timeout=20*60,
+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', }}
+ 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(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,267 +280,195 @@ 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'''
+
Build status: {{ summary }}
+
+{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
+Step: {{ step['name'] }}: {{ statuses[step['results']] }}
+{% for log in step['logs'] %}
+Last 40 lines of {{ log['name'] }} :
+{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
+
+{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
+{% endfor %}
+
+
+{% 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
+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)
-import cgi
-import re
+c['services'].append(mn)
-# 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.
+## ExecDB's push-notifications
- 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]
+sp = reporters.HttpStatusPush(
+ serverUrl="{{ execdb_statuspush }}",
+ wantProperties=True,
+ wantSteps=True,
+)
+c['services'].append(sp)
- limit_lines = 40
- text = list()
- text.append(u'Build status: %s ' % result.upper())
- text.append(u'')
- text.append(u"Buildslave for this Build: %s " % build.getSlavename())
- if master_status.getURLForThing(build):
- text.append(u'Complete logs for all build steps: %s '
- % (master_status.getURLForThing(build),
- master_status.getURLForThing(build))
- )
- text.append(u'
')
-
- 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, 'Task name: %s ' % taskname.upper())
-
- url = u'%s/steps/%s/logs/%s' % (master_status.getURLForThing(build),
- log.getStep().getName(), log.getName())
-
- text.append(u'Last %d lines of "%s" ' % (limit_lines, name))
-
- unilist = list()
- for line in content[len(content)-limit_lines:]:
- unilist.append(cgi.escape(unicode(line,'utf-8')))
- text.append(u'')
- text.extend(unilist)
- text.append(u' ')
-
- return {
- 'body': u"\n".join(text),
- 'type': 'html'
- }
-
-mn = 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['status'].append(mn)
-
-# ExecDB's push-notifications:
-import buildbot.status.status_push
-sp = buildbot.status.status_push.HttpStatusPush(
- serverUrl="{{ execdb_statuspush }}",
- debug=True)
-c['status'].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.
- {% if deployment_type in ['dev', 'stg', 'prod'] %}
+ # 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 %}
-
+{% endif %}
}
diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.dev b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.dev
deleted file mode 100644
index 2669241a09..0000000000
--- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.dev
+++ /dev/null
@@ -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'''
-Build status: {{ summary }}
-
-{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
-Step: {{ step['name'] }}: {{ statuses[step['results']] }}
-{% for log in step['logs'] %}
-Last 40 lines of {{ log['name'] }} :
-{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
-
-{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
-{% endfor %}
-
-
-{% 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 %}
-}
diff --git a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.stg b/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.stg
deleted file mode 100644
index 2669241a09..0000000000
--- a/roles/taskotron/buildmaster-configure/templates/taskotron.master.cfg.j2.stg
+++ /dev/null
@@ -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'''
-Build status: {{ summary }}
-
-{% for step in build['steps'] if statuses[step.results] in ["warnings", "failure", "exception"] %}
-Step: {{ step['name'] }}: {{ statuses[step['results']] }}
-{% for log in step['logs'] %}
-Last 40 lines of {{ log['name'] }} :
-{# buildbot returns an extra first character for each line (a bug?) denoting its color #}
-
-{% for line in log['content']['content'].split('\n')[-40:] %}{{ line[1:] }}
-{% endfor %}
-
-
-{% 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 %}
-}
diff --git a/roles/taskotron/buildmaster/tasks/main.yml b/roles/taskotron/buildmaster/tasks/main.yml
index 68d3729dd4..38301841c6 100644
--- a/roles/taskotron/buildmaster/tasks/main.yml
+++ b/roles/taskotron/buildmaster/tasks/main.yml
@@ -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
diff --git a/roles/taskotron/buildslave-configure/tasks/main.yml b/roles/taskotron/buildslave-configure/tasks/main.yml
index 007072ba4a..c536ae19eb 100644
--- a/roles/taskotron/buildslave-configure/tasks/main.yml
+++ b/roles/taskotron/buildslave-configure/tasks/main.yml
@@ -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 }}
diff --git a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2 b/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2
index d3ee92ff64..d2e9cd84b8 100644
--- a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2
+++ b/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2
@@ -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,
- 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
+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'] %}
-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)
diff --git a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.dev b/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.dev
deleted file mode 100644
index d2e9cd84b8..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.dev
+++ /dev/null
@@ -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)
diff --git a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.stg b/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.stg
deleted file mode 100644
index d2e9cd84b8..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildbot.tac.j2.stg
+++ /dev/null
@@ -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)
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2 b/roles/taskotron/buildslave-configure/templates/buildslave.service.j2
index 84e12ffcdc..5bd5e5e431 100644
--- a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2
+++ b/roles/taskotron/buildslave-configure/templates/buildslave.service.j2
@@ -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
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.dev b/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.dev
deleted file mode 100644
index 5bd5e5e431..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.dev
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.stg b/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.stg
deleted file mode 100644
index 5bd5e5e431..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildslave.service.j2.stg
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2 b/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2
index a66b743384..0e35661fb5 100644
--- a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2
+++ b/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2
@@ -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 }}
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.dev b/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.dev
deleted file mode 100644
index 0e35661fb5..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.dev
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.stg b/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.stg
deleted file mode 100644
index 0e35661fb5..0000000000
--- a/roles/taskotron/buildslave-configure/templates/buildslave@.service.j2.stg
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/buildslave/tasks/main.yml b/roles/taskotron/buildslave/tasks/main.yml
index 5bea2e9b0b..056b614d9f 100644
--- a/roles/taskotron/buildslave/tasks/main.yml
+++ b/roles/taskotron/buildslave/tasks/main.yml
@@ -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
diff --git a/roles/taskotron/execdb/tasks/main.yml b/roles/taskotron/execdb/tasks/main.yml
index 6c5eb5b0dc..cae0129a09 100644
--- a/roles/taskotron/execdb/tasks/main.yml
+++ b/roles/taskotron/execdb/tasks/main.yml
@@ -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 }}"
diff --git a/roles/taskotron/resultsdb-backend/tasks/main.yml b/roles/taskotron/resultsdb-backend/tasks/main.yml
index 5c8e371936..17c5e9150d 100644
--- a/roles/taskotron/resultsdb-backend/tasks/main.yml
+++ b/roles/taskotron/resultsdb-backend/tasks/main.yml
@@ -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 }}"
diff --git a/roles/taskotron/resultsdb-frontend/tasks/main.yml b/roles/taskotron/resultsdb-frontend/tasks/main.yml
index 385ed9182d..db1b7b0df5 100644
--- a/roles/taskotron/resultsdb-frontend/tasks/main.yml
+++ b/roles/taskotron/resultsdb-frontend/tasks/main.yml
@@ -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
diff --git a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2 b/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2
index 19b070ad07..83b131835f 100644
--- a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2
+++ b/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2
@@ -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]
"""
diff --git a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.dev b/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.dev
deleted file mode 100644
index 83b131835f..0000000000
--- a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.dev
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.stg b/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.stg
deleted file mode 100644
index 83b131835f..0000000000
--- a/roles/taskotron/taskotron-client/templates/settings.py.testcloud.j2.stg
+++ /dev/null
@@ -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
diff --git a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2 b/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2
index 171b9c4683..8669da850e 100644
--- a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2
+++ b/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2
@@ -64,7 +64,7 @@
Browse Task Results
- Recently Executed Tasks
+ Recently Executed Tasks
Documentation
diff --git a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.dev b/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.dev
deleted file mode 100644
index 8669da850e..0000000000
--- a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.dev
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Taskotron {{ landingpage_title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Trivial local execution 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.
-
-
-
-
-
-
-
-
-
-
Simple check management Package maintainers in full control of their package-related checks, no hurdles.
-
-
-
-
-
-
-
-
Support for package-related checks Can this new build of firefox package be safely updated? Do the functional tests pass for this new build of openssh?
-
-
-
-
-
-
-
-
-
-
Support for distribution-wide checks Can this set of packages be pushed to stable? Is this new system compose installable?
-
-
-
-
-
-
-
-
Event-based 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.
-
-
-
-
-
-
-
-
-
-
Decoupled design 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.
-
-
-
-
-
-
-
-
Open source rockstar Taskotron is under active development. If you're interested in contributing, check out our development guide and the tickets and tasks on our project page .
-
-
-
-
-
-
-
-
Get in touch!
-
-
Email on The Fedora qa-devel list
-
In #fedora-qa on Freenode IRC
-
Check the Pagure
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.stg b/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.stg
deleted file mode 100644
index 8669da850e..0000000000
--- a/roles/taskotron/taskotron-frontend/templates/landingpage.html.j2.stg
+++ /dev/null
@@ -1,184 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Taskotron {{ landingpage_title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Trivial local execution 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.
-
-
-
-
-
-
-
-
-
-
Simple check management Package maintainers in full control of their package-related checks, no hurdles.
-
-
-
-
-
-
-
-
Support for package-related checks Can this new build of firefox package be safely updated? Do the functional tests pass for this new build of openssh?
-
-
-
-
-
-
-
-
-
-
Support for distribution-wide checks Can this set of packages be pushed to stable? Is this new system compose installable?
-
-
-
-
-
-
-
-
Event-based 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.
-
-
-
-
-
-
-
-
-
-
Decoupled design 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.
-
-
-
-
-
-
-
-
Open source rockstar Taskotron is under active development. If you're interested in contributing, check out our development guide and the tickets and tasks on our project page .
-
-
-
-
-
-
-
-
Get in touch!
-
-
Email on The Fedora qa-devel list
-
In #fedora-qa on Freenode IRC
-
Check the Pagure
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/roles/taskotron/taskotron-trigger/tasks/main.yml b/roles/taskotron/taskotron-trigger/tasks/main.yml
index 32d6bf0e48..883e2aeaac 100644
--- a/roles/taskotron/taskotron-trigger/tasks/main.yml
+++ b/roles/taskotron/taskotron-trigger/tasks/main.yml
@@ -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']
-###########
diff --git a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2
index 411d650343..fd28318429 100644
--- a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2
+++ b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2
@@ -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
diff --git a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.dev b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.dev
deleted file mode 100644
index fd28318429..0000000000
--- a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.dev
+++ /dev/null
@@ -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 =
diff --git a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.stg b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.stg
deleted file mode 100644
index fd28318429..0000000000
--- a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2.stg
+++ /dev/null
@@ -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 =
diff --git a/roles/taskotron/vault/tasks/main.yml b/roles/taskotron/vault/tasks/main.yml
index 032451ef8f..6b5511e99b 100644
--- a/roles/taskotron/vault/tasks/main.yml
+++ b/roles/taskotron/vault/tasks/main.yml
@@ -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 }}"