[JIRA] (JENKINS-56736) strage behavior of manager.logContains() API in Groovy Post Build plugin

2019-04-18 Thread szgean...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Geanina Sz commented on  JENKINS-56736  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: strage behavior of manager.logContains() API in Groovy Post Build plugin   
 

  
 
 
 
 

 
 Hi,   Any updates on this? Still having issues using manager.logContains.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-56736) strage behavior of manager.logContains() API in Groovy Post Build plugin

2019-03-25 Thread szgean...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Geanina Sz created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-56736  
 
 
  strage behavior of manager.logContains() API in Groovy Post Build plugin   
 

  
 
 
 
 

 
Issue Type: 
  Task  
 
 
Assignee: 
 Stefan Wolf  
 
 
Components: 
 groovy-postbuild-plugin  
 
 
Created: 
 2019-03-25 09:42  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Geanina Sz  
 

  
 
 
 
 

 
 Hi,   Trying to use Groovy Post build plugin in order to parse build output log in reverse order.  manager.logContains seems not to be suitable for my since it always parse the log from the begging and I am using a variable in my scripted pipeline as a matcher which needs to be updated with latest value found in the console output. This seems not to be happening.  The scenario is: in the same build log I have several text lines like: Failed: *. In case I find Failed: 0, I do something, in case of Failed: anything but 0, I do something else.  Using:  if(manager.logContains(".Failed: 0.")) {if(manager.logContains(".Failed: 0.")) {     println "No failure"     println "+ ${manager.logContains(".Failed: 0.")}" } else if(matcher?.matches()){            echo 'Matches!!'                buildMsg=matcher.group(1).toInteger()            if ((buildMsg - failure)> 0) {           println 'There are tests failed!'        //   manager.buildUnstable()          throw new RuntimeException("Failed")           }      } this does not work properly. Can you please help to solve this?   Thank you!