LeeWay
LeeWay

Reputation: 803

Copy Artifact Plugin - Copy from WORKSPACE without the path from Artifacts to copy

I would like to copy Jenkins WORKSPACE items from a job to another using Copy Artifact Plugin as follows:

Plugin setup

The copy is performed but the content of the Target Directory will be: c:/AUT/output/bundle/<all files and folders>

How can I modify the Artifacts to copy or Target directory in order to have the following result: c:/AUT/<all files and folders>?

Just to be more clear, I would like to copy only the content of /output/bundle/<all files and folders> not having the /output/bundle/ path in the Target directory.

Upvotes: 8

Views: 5664

Answers (1)

lomo44
lomo44

Reputation: 21

There should be a "flatten directory" option in the advanced setting, which will expand whatever you have in the source directory to the target directory. However, this will also expand the folder in the source directory, to solve that you need to be more specific on the source folder and the destination folder. For example, src: output/bundle/a/**, dst: ${AUT}/a/

Upvotes: 2

Related Questions