From 2a1d5cb90433b2a2daa99cd0cefe48db84433132 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Sun, 10 May 2020 23:26:30 +0200 Subject: [PATCH] change hook settings --- defaults/main.yaml | 3 +++ templates/buildbot/master.cfg.j2 | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 73a43cd..16e4f8b 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -11,3 +11,6 @@ buildbot_builders: {} buildbot_hello_world_example: true buildbot_local_worker: true + +buildbot_github_change_hook: false +buildbot_gitea_change_hook: false diff --git a/templates/buildbot/master.cfg.j2 b/templates/buildbot/master.cfg.j2 index 49b7f15..544a916 100644 --- a/templates/buildbot/master.cfg.j2 +++ b/templates/buildbot/master.cfg.j2 @@ -30,7 +30,15 @@ c['www'] = dict( badges={"left_pad": 0, "right_pad": 0, "border_radius": 3, "style": "badgeio"}, ), change_hook_dialects={ - 'github': {} + {% if buildbot_github_change_hook %} + 'github': {}, + {% endif %} + {% if buildbot_gitea_change_hook %} + 'gitea': { + 'secret': '{{buildbot_gitea_webhook_secret}}', + 'onlyIncludePushCommit': False, + }, + {% endif %} }, )