Skip to Content

Can Redwood intercept and combine the output of all jobs in one chain then put this on a network share?


We have a request from Security to use Redwood to run jobs for PS1, in the background, then intercept the output, combine it and send it to

a network share.

This would be 1 Chain with 10 steps with each step having its own spool output. At the end of the Chain , Redwood would intercept all of this

output , zip it together, then send this zip file to a network share to be used by Security and Auditors.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 11, 2014 at 06:29 PM

    Hi Donna,

    You can create a job definition of type Redwood script, and add it as step 11. In that job definition, you can use the redwood script to iterate through each step in the job chain and fetch the output (getJobFileByName), and write them to a folder in a process server connected to the network share(platform agent).

    Now, i do not know of any zipping methods using redwood script, so you can develop a *.bat or *.sh file to zip the folders and also copy/move it to network share location. Now add this as step 12 in the job chain.

    Thanks

    Nanda

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Nanda,

      Please have a look at ZipOutputStream (Java Platform SE 7 ), there are numerous examples out there on the web of how to use this to create zip files in Java, note that you can also use JarOutputStream and give the file a .zip extension.

      Note also that you must iterate over all child jobs of the step, steps have no output ;-). We should probably also invite users to post code samples, that way we can help out.

      More complex, still, if you have a job chain with sub-chain (job chain in job chain), you will have to iterate over the jobs in step of the parent, if the job is in fact a child job chain, iterate over its children (steps of the subchain) to retrieve the child jobs and their output ...

      Regards,

      HP

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.