Gosaka
Gosaka

Reputation: 191

Where is the copied artifact from the previous build saved

I have two jenkins jobs which are chained. The first job will run some testNG tests , in which we may get some failures. (A testng-failed.xml file will be generated that has all the tests that failed). In my second job, I need to run using that testng-failed.xml as my suite file. So I am using jenkins copy artifact plugin and saving the testng-failed.xml file. I am able to retrive it in the second job , where it says "Copied 1 artifact from "rerun_exp" build number 7". But the problem is I dont know where it is saved to be used as my suite file.

Upvotes: 0

Views: 1182

Answers (1)

Christopher Orr
Christopher Orr

Reputation: 111565

You can easily check where the file is by looking in the workspace.
This can even be done directly from the Jenkins web UI, via the "Workspace" link in the sidebar of the job page.

Files matched by the "Artifacts to copy" field are copied to the same directory structure as the source build had.

You can use the "Flatten directories" option if you want the file(s) to be copied to the root of the build workspace. If you click the (?) help icon to the right of that checkbox, you can see documentation for this and for your original question.

Upvotes: 3

Related Questions