I hoped there would be an easier way, but i'll try if i can figure it out 
for the ECS plugin

Am Dienstag, 14. Januar 2020 18:11:27 UTC+1 schrieb Jesse Glick:
>
> On Tue, Jan 14, 2020 at 10:26 AM Andreas Sieferlinger 
> <psdsief...@gmail.com <javascript:>> wrote: 
> > The problem in this context is that due to the agents being ephemeral 
> they are deleted immediately after they stop, and with that also this log 
> is gone. 
> > So the idea was to add some basic output (eg the TaskID) in the actual 
> build log for easier debugging for users. 
>
> Reminds me of: https://github.com/jenkinsci/kubernetes-plugin/pull/497 
>
> In general, diagnostics for ephemeral agents are not great. If you use 
> for example the `dockerNode` step, then the Jenkins queue is bypassed 
> and the agent log is just streamed into the owning build log. I do not 
> think there is a simple way for `Computer` (etc.) implementation to 
> inject this into the log for a user of the general `node` step or 
> freestyle builds, though. The best I can come up with (Pipeline only) 
> is to implement 
>
>
> https://javadoc.jenkins.io/plugin/workflow-api/org/jenkinsci/plugins/workflow/flow/StepListener.html
>  
>
> then check whether it is `node` (`ExecutorStep`) being run, and if the 
> context says that the `Computer` is yours, ask the context for the 
> `TaskListener` and copy the `Computer.getLogText` so far. Ideally 
> there would be a real API for a computer to print some information 
> when a build starts using an executor on it; or some flag indicating 
> that it is ephemeral and single-use so that the code using the 
> executor (e.g., `ExecutorStepExecution`) could decide to stream the 
> agent log. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/412c9d32-9b94-4ba7-8d12-14618655e201%40googlegroups.com.

Reply via email to