Jenkins, how can I archive one subdirectory (without it, the whole tree structure above)?

I use Jenkins for nightly building an iOS static frame. The result that I care about is in this directory:

IOS / assemblies / Release-iphoneuniversal / MySpecialProject.framework

I would like to use the Archive Artifacts action to archive MySpecialProject.framework, but when I do this, it creates an entire archive with the entire leading directory structure. The docs say how to do this Ant. I am not familiar with Ant, so I do not understand here.

The main thing is to make "MySpecialProject.framework" available as an artifact for other projects created with Jenkins. So, thinking that I can use the Copy Artifact plugin for this. But I can’t get past this thing, where a complete directory structure is created here. I just "MySpecialProject.framework" became a top-level artifact.

Thanks in advance.

+4
source share
1 answer

I fixed my own problem by inserting the "Execute Shell" command:

mv ios/build/Release-iphoneuniversal/MySpecialProject.framework . 

Then in the post-build action "Archive artifacts" I was able to simply archive "MySpecialProject.framework / **"

This seems to work very well. Since every time Jenkins starts the task, it creates a new workspace, I don’t have to worry about problems with "mv". It works great.

+4
source

All Articles