[JIRA] (JENKINS-49403) Pipeline method to get the log of a specific stage

2018-03-05 Thread svano...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sam Van Oort closed an issue as Won't Do  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Closing due to lack of a solid use-case which cannot be better met by other methods.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-49403  
 
 
  Pipeline method to get the log of a specific stage   
 

  
 
 
 
 

 
Change By: 
 Sam Van Oort  
 
 
Status: 
 Open Closed  
 
 
Resolution: 
 Won't Do  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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 

[JIRA] (JENKINS-49403) Pipeline method to get the log of a specific stage

2018-03-05 Thread svano...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sam Van Oort commented on  JENKINS-49403  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline method to get the log of a specific stage   
 

  
 
 
 
 

 
 Ray Kivisto There are much more effective ways to accomplish what you describe (agent health monitoring) rather than embedding it inside pipeline. As a starting point, my go-to would be operations tools for maintaining/monitoring infra – Kubernetes or other Docker-management healthchecks, Nagios or similar platform monitoring, or even a basic script that runs a check and takes the node offline if unhealthy. Failing that, there is probably a plugin to take nodes offline if specific criteria are met or run pre-checks before using them. The Slave Prerequisites plugin might be a good starting point if brought up to date with modern Jenkins. You could also do something custom with Listener APIs. It's simply not maintainable if you mix your CI/CD execution logic with the infra-management/operations logic for the build agent – and it is not future-safe to rely on Pipelines directly invoking on-master APIs to do things like take nodes offline. I'll add in one more fun wrinkle: a Stage simply represents a fragment of the Pipeline Directed Acyclic Graph - that means it can itself include child parallels and stages which may be complete or incomplete. This would make it hard to correctly target an operation at the right node block to take one offline – the logs are more usable for users than for automation.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving 

[JIRA] (JENKINS-49403) Pipeline method to get the log of a specific stage

2018-03-05 Thread ray.kivi...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Ray Kivisto commented on  JENKINS-49403  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline method to get the log of a specific stage   
 

  
 
 
 
 

 
 One benefit would be if you have parallel stages (for example building different variants of an app on different agents), and in the subsequent stage after the parallel block, you could scan the logs from each stage to tell if there are any warnings/errors that could indicate an infrastructure issue with the agent that was used, and mark that agent offline to prevent subsequent builds from using an agent with infrastructure issues. Since each parallel stage runs on a different agent than the final stage outside the parallel block, tee-ing the output to a file in each stage doesn't help (unless you used 'stash' and 'unstash', which would double the logs per build in JENKINS_HOME), one could do a grep of the file inside the parallel stage, but for non-critical warnings such as I/O slowdown, marking the agent that is currently executing a stage offline would likely cause the stage to be marked as a failure. I expect there are other use cases where getting stage logs would be useful, and a plugin doesn't already exist for that use case.  If there is a way we could access them using a global pipeline shared library (so it's not restricted by the script security sandbox), that would also be a good workaround.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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, 

[JIRA] (JENKINS-49403) Pipeline method to get the log of a specific stage

2018-02-08 Thread svano...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Sam Van Oort commented on  JENKINS-49403  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Pipeline method to get the log of a specific stage   
 

  
 
 
 
 

 
 Javier Raez Please provide a bit more detail – explain why you would like this, and what you hope it will do for you.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
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.