0

I have a JSR-352 application. It performs Batch Processing and thus is a command line application writing logs to stdout. This goes nicely with Jenkins that provides a perfect UI to configure/run the jobs, analyze the log output etc.

But I'd like to display the Batch Job's steps similar to Jenkins pipeline phases. Is there some way to accomplish this?

1 Answer 1

0

While not a complete answer, this is what I have investigated so far:

There is no Jenkins support for Java Batch out of the box. A specialized plugin could change that but would still have to be created. Such a dedicated plugin can render the batch job similar to the Pipeline Graph View plugin.

The tricky part is that Jenkins will run the Java executable as one step. As long as that remains there is no way for Jenkins to distinguish batch jobs or their steps other than analyzing the output. If the batch announces start and end of a step there is a Jenkins plugin that can detect this and allow the UI to split log output based on that. The Collapsing Console Sections plugin is an example for that.

To have a consistent behaviour across all jobs it makes sense to add a StepListener to produce the output detected by the plugin. Going forward in the context of the question, the identified steps could then be rendered similar to the Pipeline Stage View plugin.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.