search cancel

How can we add additional files to the ZIp file that is created during the generator process that is attached to the Finished Job Tile?

book

Article ID: 203295

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We are working with TDM Data Generators that are used from Jenkins pipes to generate data from our TEST Host. 

The generator makes a Post Publish Action call to a "java post action" that uses a call to our TEST mainframe system that returns an XML File with the new data generated.

Once the generation job ends, we get a zip file hanging from the label of the submitted request-id.
The zip file is two files: 

  - Job_23748_Data_Pool_Generador_sample_file.log

  - sampletable.xml

The question is:
How can we add the XML file created in the POST Publish Action from our custom Jar into the zip file that is being generated?

The thing is that we need to get a zip file with content like:
 - Job_23748_Data_Pool_Generador_sample_file.log
- sampletable.xml
- Data_for_Test.xml

We can get the zip file and read anything inside it, but we do not know how to add additional files to it.

 

 

Environment

TDM portal 4.9.X

Component : CA Test Data Manager

Cause

NA

Resolution

The Generator files are store in a directory in the TDM portal in a job_id directory before they are zip.
By default on windows, this will be.
C:\ProgramData\CA\CA Test Data Manager Portal\Jobs\JOB_ID
example:
C:\ProgramData\CA\CA Test Data Manager Portal\Jobs\Job_13

The Post Publish Action  would need to call a batch file or script and pass in the Two variables
~PUBJOBID ~
~ PUBJOBOUTDIR~

(These can be seen in data Painter.)

An example of this would be:

myscript.bat ~PUBJOBID ~ ~ PUBJOBOUTDIR~

The custom script would need to take care of copying any additional files to the directory so they could be included in the file zip file.

NOTE: On the post-action script you MUST select wait for completion or the files may not be added.

Additional Information

These variables can be seen in the TDM Portal Data Painter:

Attachments