aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Granberg <zorry@gentoo.org>2022-07-23 00:18:44 +0200
committerMagnus Granberg <zorry@gentoo.org>2022-07-23 00:18:44 +0200
commit07a0c6eb02b632e88bc8d288c33015c8b43e93e0 (patch)
treea37c9ae35c028666e7be9780301c2cfc6f645439
parentReado the match stage (diff)
downloadtinderbox-cluster-07a0c6eb02b632e88bc8d288c33015c8b43e93e0.tar.gz
tinderbox-cluster-07a0c6eb02b632e88bc8d288c33015c8b43e93e0.tar.bz2
tinderbox-cluster-07a0c6eb02b632e88bc8d288c33015c8b43e93e0.zip
Use Webhook for Gitlab and use git@ for repo's
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r--buildbot_gentoo_ci/config/schedulers.py3
-rw-r--r--buildbot_gentoo_ci/steps/builders.py12
-rw-r--r--master.cfg12
3 files changed, 20 insertions, 7 deletions
diff --git a/buildbot_gentoo_ci/config/schedulers.py b/buildbot_gentoo_ci/config/schedulers.py
index 7c0aa6b..2e5379c 100644
--- a/buildbot_gentoo_ci/config/schedulers.py
+++ b/buildbot_gentoo_ci/config/schedulers.py
@@ -37,7 +37,8 @@ def getGitChanges(props):
change_data['committer'] = k['committer']
change_data['comments'] = k['comments']
change_data['revision'] = k['revision']
- change_data['timestamp'] =k['when_timestamp']
+ change_data['timestamp'] = k['when_timestamp']
+ change_data['branch'] = k['branch']
return change_data
def gentoo_schedulers():
diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py
index ccb28e1..38dfa79 100644
--- a/buildbot_gentoo_ci/steps/builders.py
+++ b/buildbot_gentoo_ci/steps/builders.py
@@ -16,7 +16,7 @@ from buildbot.process.results import SUCCESS
from buildbot.process.results import FAILURE
from buildbot.process.results import SKIPPED
from buildbot.process.results import WARNINGS
-from buildbot.plugins import steps
+from buildbot.plugins import steps, util
#FIXME: should be set in config
hosturl = 'http://90.231.13.235:8000'
@@ -374,7 +374,11 @@ class UpdateRepos(BuildStep):
mode='full',
submodules=True,
alwaysUseLatest=True,
- workdir=repository_path)
+ workdir=repository_path,
+ #FIXME: set filenames in repositorys db
+ sshPrivateKey = util.Secret("gitlab.gentoo.org_gentoo-ci.priv"),
+ sshHostKey = util.Secret("gitlab.gentoo.org.host")
+ )
])
return SUCCESS
@@ -1272,7 +1276,7 @@ class SetupStepts(BuildStep):
else:
for cpv, v in package_dict.items():
if re.search(cp, cpv):
- yield log.addStdout('Got' + cpv + '\n')
+ yield log.addStdout('Got' + cpv + '\n')
yield log.addStdout('Match: NO\n')
# check for error
if stderr != []:
@@ -1284,7 +1288,7 @@ class SetupStepts(BuildStep):
yield log.addStdout('Error: NO\n')
return SKIPPED
build = True
- yield log.addStdout('Got' + self.getProperty("cpv") + '\n')
+ yield log.addStdout('Got ' + self.getProperty("cpv") + '\n')
yield log.addStdout('Match: YES\n')
# update packages before any tests
if build:
diff --git a/master.cfg b/master.cfg
index 7d5af61..af50ec2 100644
--- a/master.cfg
+++ b/master.cfg
@@ -48,7 +48,7 @@ c['protocols'] = {'pb': {'port': 9989}}
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes. Here we point to the buildbot version of a python hello-world project.
-c['change_source'] = change_source.gentoo_change_source()
+#c['change_source'] = change_source.gentoo_change_source()
####### SCHEDULERS
@@ -91,7 +91,15 @@ c['titleURL'] = "https://gentoo-ci.gentoo.org"
c['buildbotURL'] = "http://90.231.13.235:8010/"
# minimalistic config to activate new web UI
-c['www'] = dict(port=8010, plugins=dict(waterfall_view={}, console_view={}, grid_view={}))
+c['www'] = dict(
+ port=8010,
+ plugins=dict(waterfall_view={}, console_view={}, grid_view={}),
+ change_hook_dialects={
+ 'gitlab' : {
+ 'secret': util.Secret("WWWHookGitlabToken"),
+ },
+ },
+)
c['www']['ui_default_config'] = {
'Waterfall.lazy_limit_waterfall': 408,