Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 005AF9A29 for ; Thu, 31 May 2012 22:09:25 +0000 (UTC) Received: (qmail 8165 invoked by uid 500); 31 May 2012 22:09:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 8045 invoked by uid 500); 31 May 2012 22:09:23 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 7904 invoked by uid 99); 31 May 2012 22:09:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2012 22:09:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 5D47214285A for ; Thu, 31 May 2012 22:09:23 +0000 (UTC) Date: Thu, 31 May 2012 22:09:23 +0000 (UTC) From: "Steven Rowe (JIRA)" To: dev@lucene.apache.org Message-ID: <710403775.24284.1338502163387.JavaMail.jiratomcat@issues-vm> In-Reply-To: <765635375.17927.1338407543195.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (LUCENE-4092) Check what's Jenkins pattern for e-mailing log fragments (so that it includes failures). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286994#comment-13286994 ] Steven Rowe commented on LUCENE-4092: ------------------------------------- Two problems: # Spreading the BUILD_LOG_REGEX regex value over multiple lines is not supported by Jenkins's email templating functionality, which is provided by the Jenkins Email Extension Plugin (email-ext) [https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin]. See [the configuration token parsing regexes in ContentBuilder.Tokenizer|https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/ContentBuilder.java#L134], in particular the comment over the {{stringRegex}} field:{code:java}// Sequence of (1) not \ " CR LF and (2) \ followed by non line terminator private static final String stringRegex = "\"([^\\\\\"\\r\\n]|(\\\\.))*\"";{code} This could be fixed by allowing line terminators to be escaped:{code:java}// Sequence of (1) not \ " CR LF and (2) \ followed by any non-CR/LF character or (CR)LF private static final String stringRegex = "\"([^\\\\\"\\r\\n]|(\\\\(?:.|\r?\n)))*\"";{code} I submitted a Jenkins JIRA issue for this: [https://issues.jenkins-ci.org/browse/JENKINS-13976]. # [BuildLogRegexContent, the content parser for BUILD_LOG_REGEX, matches line-by-line|https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContent.java#L213], so regexes targeting multiple lines will fail. I can see two possible routes to address this: ## The BUILD_LOG_EXCERPT token allows specification of begin/end line regexes, and includes everything inbetween matches. I'm doubtful this will enable capture of the stuff we want, though. ## I'll try to add an argument to BUILD_LOG_REGEX to enable multi-line content matching, and make a pull request/JIRA issue to get it included in the next release of the plugin. In the mean time, I'll switch the configuration in our Jenkins jobs to the following: {noformat} Build: ${BUILD_URL} ${FAILED_TESTS} Build Log: ${BUILD_LOG_REGEX,regex="[ \\t]*(?:\\[javac\\]\\s+[1-9]\\d*\\s+error|\\[junit4\\].*<<<\\s+FAILURES!|\\[javadoc\\]\\s+[1-9]\\d*\\s+warning).*",linesBefore=100} ${BUILD_LOG_REGEX,regex="[ \\t]*\\[echo\\].*)*\\s*[1-9]\\d*\\s+Unknown\\s+Licenses.*",linesBefore=17,linesAfter=20} ${BUILD_LOG_REGEX,regex="[ \\t]*javadocs-lint:.*",linesBefore=0,linesAfter=75} ${BUILD_LOG_REGEX,regex=".*FATAL:.*",linesBefore=0,linesAfter=100} {noformat} > Check what's Jenkins pattern for e-mailing log fragments (so that it includes failures). > ---------------------------------------------------------------------------------------- > > Key: LUCENE-4092 > URL: https://issues.apache.org/jira/browse/LUCENE-4092 > Project: Lucene - Java > Issue Type: Sub-task > Components: general/test > Reporter: Dawid Weiss > Priority: Trivial > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org