{"id":2409,"date":"2011-10-05T11:14:06","date_gmt":"2011-10-05T01:14:06","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=2409"},"modified":"2011-10-05T11:14:06","modified_gmt":"2011-10-05T01:14:06","slug":"using-jenkins-to-parse-sphinx-warnings","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2011\/10\/05\/using-jenkins-to-parse-sphinx-warnings\/","title":{"rendered":"Using Jenkins to parse sphinx warnings"},"content":{"rendered":"<p>At <a href=\"http:\/\/www.percona.com\">Percona<\/a>, we&#8217;re <a href=\"http:\/\/www.mysqlperformanceblog.com\/2011\/10\/03\/updated-percona-server-and-percona-xtrabackup-documentation\/\">now using sphinx for our documentation<\/a>. We&#8217;re also using <a href=\"http:\/\/jenkins-ci.org\/\">Jenkins<\/a> for <a href=\"http:\/\/jenkins.percona.com\/\">our \u00c2\u00a0continuous integration<\/a>. We have compiler warnings from <a href=\"http:\/\/gcc.gnu.org\/\">GCC<\/a> being parsed by Jenkins using the built in filters, but there isn&#8217;t one for the sphinx warnings.<\/p>\n<p>Luckily, in the configuration page for Jenkins, the Warnings plugin allows you to specify your own filters. I&#8217;ve added the following filter to process warnings from sphinx:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2410\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2011\/10\/05\/using-jenkins-to-parse-sphinx-warnings\/jenkins-sphinx\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png?fit=919%2C491&amp;ssl=1\" data-orig-size=\"919,491\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"jenkins-sphinx\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png?fit=584%2C312&amp;ssl=1\" class=\"aligncenter size-full wp-image-2410\" title=\"jenkins-sphinx\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png?resize=584%2C312\" alt=\"\" width=\"584\" height=\"312\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png?w=919&amp;ssl=1 919w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2011\/10\/jenkins-sphinx.png?resize=300%2C160&amp;ssl=1 300w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/a><\/p>\n<p>For those who want to copy and paste:<\/p>\n<p>Regex:\u00c2\u00a0^(.*):(\\d+): \\((.*)\\) (.*)<\/p>\n<p>Mapping Script<\/p>\n<pre>import hudson.plugins.warnings.parser.Warning<\/pre>\n<pre>String fileName = matcher.group(1)\r\nString lineNumber = matcher.group(2)\r\nString category = matcher.group(3)\r\nString message = matcher.group(4)\r\n\r\nreturn new Warning(fileName, Integer.parseInt(lineNumber), \"sphinx\", category, message);<\/pre>\n<p>Example log message:\u00c2\u00a0\/home\/stewart\/percona-server\/docs-5.1\/doc\/source\/release-notes\/Percona-Server-1.0.2-3.rst:67: (WARNING\/2) Inline literal start-string without end-string.<\/p>\n<p>Then I can select this filter from the job that builds (and publishes) our documentation and it shows up like any other compiler warnings. Neat!<\/p>\n<p>TODO: get the intersphinx warnings also in there<\/p>\n<p>TODO: fix the linkcheck target in Sphinx so that it&#8217;s easily parseable and can also be integrated.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At Percona, we&#8217;re now using sphinx for our documentation. We&#8217;re also using Jenkins for our \u00c2\u00a0continuous integration. We have compiler warnings from GCC being parsed by Jenkins using the built in filters, but there isn&#8217;t one for the sphinx warnings. &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2011\/10\/05\/using-jenkins-to-parse-sphinx-warnings\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[76,7],"tags":[285,438,635,437],"class_list":["post-2409","post","type-post","status-publish","format-standard","hentry","category-code","category-work-et-al","tag-documentation","tag-jenkins","tag-percona","tag-sphinx"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-CR","jetpack-related-posts":[{"id":3043,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/06\/28\/hacking-the-jenkins-bzr-plugin\/","url_meta":{"origin":2409,"position":0},"title":"Hacking the Jenkins BZR plugin","author":"Stewart Smith","date":"2012-06-28","format":false,"excerpt":"For Drizzle and for all of the projects we work on at Percona we use the Bazaar revision control system (largely because it's what we were using at MySQL and it's what MySQL still uses). We also use Jenkins. We have a lot of jobs in our Jenkins. A lot.\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3051,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/06\/28\/new-jenkins-bazaar-plugin-release-1-18\/","url_meta":{"origin":2409,"position":1},"title":"New Jenkins Bazaar plugin release! 1.18","author":"Stewart Smith","date":"2012-06-28","format":false,"excerpt":"From the desk of your new Bazaar plugin for Jenkins maintainer, I give you Version 1.18. This release has two good bug fixes: UI fix for checkout option (JENKINS-12261) Auto-recover from corrupt BZR branches (e.g. bzr branch\/checkout killed at inopportune moment) by cleaning the workspace and trying again (this is\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3149,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/08\/27\/new-jenkins-bazaar-plugin-release\/","url_meta":{"origin":2409,"position":2},"title":"New Jenkins Bazaar plugin release","author":"Stewart Smith","date":"2012-08-27","format":false,"excerpt":"I've just uploaded version 1.20 of the Bazaar plugin for Jenkins. This release is based on feedback from users and our experiences at Percona. Do a lightweight checkout instead of a heavyweight checkout (if \"Checkout\" is enabled) Fix bug: lightweight checkout \"update\" would always fail as bzr update didn't accept\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3089,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/07\/04\/jenkins-bazaar-plugin-1-19\/","url_meta":{"origin":2409,"position":3},"title":"Jenkins Bazaar plugin 1.19","author":"Stewart Smith","date":"2012-07-04","format":false,"excerpt":"I recently released a new version of the Bazaar plugin for Jenkins. This release was inspired by a problem we noticed at Percona. It is: run \"bzr revert\" after a pull, as if you have a directory that is removed and re-added while having unknown files in said directory (e.g.\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2424,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/12\/06\/puppet-vagrant-jenkins-automated-bliss\/","url_meta":{"origin":2409,"position":4},"title":"Puppet + Vagrant + jenkins = automated bliss","author":"Stewart Smith","date":"2011-12-06","format":false,"excerpt":"I'm currently teaching myself how to do Puppet. Why? Well, at Percona we support a bunch of platforms for our software. This means we have to maintain a bunch of Jenkins slaves to build the software on. We want to add new machines and have (up until now) maintained a\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2380,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/05\/21\/xtrabackup-bazaar-repositories-upgraded-to-2a-format\/","url_meta":{"origin":2409,"position":5},"title":"xtrabackup bazaar repositories upgraded to 2a format","author":"Stewart Smith","date":"2011-05-21","format":false,"excerpt":"I have just upgraded the xtrabackup bazaar code repositories to the 2a format. This means that bzr 1.16 is required to access the source code repositories now. If you get an error like the one below when working with a local branch, you'll need to run \"bzr upgrade\" in it\u2026","rel":"","context":"In &quot;percona&quot;","block_context":{"text":"percona","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/percona\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=2409"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2409\/revisions"}],"predecessor-version":[{"id":2411,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/2409\/revisions\/2411"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=2409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=2409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=2409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}