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 %} }, )