Add testresult commentlink

Will take effect when Zuul is running this change:
  I74702fd7d37358e6f4caa7e7ac0a3ede73184077

This change also adds that feature to the Zuul config and enables
it for OpenStack.  It also adds the ability to specify HTML in a
commentlink (and uses it).

Change-Id: Idb4ad8e6079165d681271987a92cab5d8b7c81be
This commit is contained in:
James E. Blair 2013-08-17 17:40:48 -07:00
parent 0ef6a1d0a6
commit b93eb82cad
7 changed files with 41 additions and 0 deletions

View File

@ -64,8 +64,13 @@
<% commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
match = "<%= commentlink['match'] %>"
<% if commentlink['link'] != "" -%>
link = "<%= commentlink['link'] %>"
<% end -%>
<% if commentlink['html'] != "" -%>
html = "<%= commentlink['html'] %>"
<% end -%>
<% end -%>
[theme]
backgroundColor = ffffff
topMenuColor = ffffff

View File

@ -18,3 +18,30 @@ a.gwt-InlineHyperlink {background: none !important}
.gwt-TabBar .gwt-TabBarItem, .gwt-TabBar .gwt-TabBarRest, .gwt-TabPanelBottom {background: 0 !important;}
#gerrit_topmenu .gwt-TextBox {width: 250px}
.comment_test_name {
display: inline-block;
*display: inline;
*zoom: 1;
width: auto !important;
width: 25em;
min-width: 20em;
padding-bottom: 2pt;
}
.comment_test_result {
}
.result_SUCCESS {
color: #007f00;
}
.result_FAILURE {
color: #cf2f19;
}
.result_UNSTABLE {
color: #e39f00;
}
.result_LOST {
color: #e39f00;
}
ul {list-style-type: none; }

View File

@ -139,6 +139,11 @@ class openstack_project::gerrit (
match => '(\\b[Bb]lue[Pp]rint\\b|\\b[Bb][Pp]\\b)[ \\t#:]*([A-Za-z0-9\\-]+)',
link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2',
},
{
name => 'testresult',
match => '<li>([^ ]+) <a href=\"[^\"]+\">([^<]+)</a> : ([^ ]+)([^<]*)</li>',
html => '<li><span class=\"comment_test_name\"><a href=\"$2\">$1</a></span> <span class=\"comment_test_result\"><span class=\"result_$3\">$3</span>$4</span></li>',
},
],
war => $war,
contactstore => $contactstore,

View File

@ -27,6 +27,7 @@ class openstack_project::zuul_dev(
zuul_ssh_private_key => $zuul_ssh_private_key,
url_pattern => $url_pattern,
push_change_refs => false,
job_name_in_report => true,
status_url => 'http://zuul-dev.openstack.org/',
statsd_host => $statsd_host,
}

View File

@ -27,6 +27,7 @@ class openstack_project::zuul_prod(
zuul_ssh_private_key => $zuul_ssh_private_key,
url_pattern => $url_pattern,
push_change_refs => false,
job_name_in_report => true,
status_url => 'http://status.openstack.org/zuul/',
statsd_host => $statsd_host,
}

View File

@ -29,6 +29,7 @@ class zuul (
$status_url = "https://${::fqdn}/",
$git_source_repo = 'https://github.com/openstack-infra/zuul.git',
$push_change_refs = false,
$job_name_in_report = false,
$revision = 'master',
$statsd_host = ''
) {

View File

@ -18,3 +18,4 @@ git_dir=/var/lib/zuul/git
push_change_refs=<%= push_change_refs %>
url_pattern=<%= url_pattern %>
status_url=<%= status_url %>
job_name_in_report=<%= job_name_in_report %>