From cff6c8b50cb421ddfe7a57965a0054ba29d03d7f Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Sat, 21 Jan 2023 20:37:35 +0100 Subject: [PATCH] Badges style --- modules/buildbot/custom.svg.j2 | 16 ++++++++++++++++ modules/buildbot/master.py | 22 +++++++++++++++++++++- modules/buildbot/template/custom.svg.j2 | 16 ++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 modules/buildbot/custom.svg.j2 create mode 100644 modules/buildbot/template/custom.svg.j2 diff --git a/modules/buildbot/custom.svg.j2 b/modules/buildbot/custom.svg.j2 new file mode 100644 index 0000000..a9d1af8 --- /dev/null +++ b/modules/buildbot/custom.svg.j2 @@ -0,0 +1,16 @@ + + + + + + + + + + + {{ left.text }} + {{ left.text }} + {{ right.text }} + {{ right.text }} + + diff --git a/modules/buildbot/master.py b/modules/buildbot/master.py index d825c3d..a48ae19 100644 --- a/modules/buildbot/master.py +++ b/modules/buildbot/master.py @@ -159,7 +159,27 @@ def build_config() -> dict[str, Any]: util.AnyControlEndpointMatcher(role="admins"), ], ), - "plugins": dict(waterfall_view={}, console_view={}, grid_view={}, badges={}), + "plugins": dict(waterfall_view={}, console_view={}, grid_view={}, badges ={ + "left_pad" : 5, + "left_text": "Build Status", # text on the left part of the image + "left_color": "#555", # color of the left part of the image + "right_pad" : 5, + "border_radius" : 5, # Border Radius on flat and plastic badges + # style of the template availables are "flat", "flat-square", "plastic" + "template_name": "flat.svg.j2", # name of the template + "font_face": "DejaVu Sans", + "font_size": 11, + "color_scheme": { # color to be used for right part of the image + "exception": "#007ec6", # blue + "failure": "#e05d44", # red + "retry": "#007ec6", # blue + "running": "#007ec6", # blue + "skipped": "a4a61d", # yellowgreen + "success": "#4c1", # brightgreen + "unknown": "#9f9f9f", # lightgrey + "warnings": "#dfb317" # yellow + } + }), "change_hook_dialects": dict( github={ "secret": "hello", diff --git a/modules/buildbot/template/custom.svg.j2 b/modules/buildbot/template/custom.svg.j2 new file mode 100644 index 0000000..a9d1af8 --- /dev/null +++ b/modules/buildbot/template/custom.svg.j2 @@ -0,0 +1,16 @@ + + + + + + + + + + + {{ left.text }} + {{ left.text }} + {{ right.text }} + {{ right.text }} + +