[英]Jenkins, how can I archive a single subdirectory (without it's whole tree structure above)?
I'm using Jenkins to do nightly build of an iOS static framework. 我正在使用Jenkins每晚构建一个iOS静态框架。 The output that I care about is in this directory:
我关心的输出是在这个目录中:
ios/build/Release-iphoneuniversal/MySpecialProject.framework IOS /构建/发布-iphoneuniversal / MySpecialProject.framework
I'd like to use the "Archive the artifacts" action to archive "MySpecialProject.framework", but when I do this, it creates a whole archive with the entire leading directory structure. 我想使用“归档工件”操作来归档“MySpecialProject.framework”,但是当我这样做时,它会创建一个包含整个前导目录结构的整个归档。 The docs say to look at how Ant does this.
文档说要看看Ant是如何做到这一点的。 I'm not familiar with Ant, so I'm at a loss here.
我对Ant不熟悉,所以我在这里不知所措。
The main point of this is to make the "MySpecialProject.framework" available as as artifact to other projects being built with Jenkins. 其主要目的是使“MySpecialProject.framework”可用作使用Jenkins构建的其他项目的工件。 So, thinking that I could use the "Copy Artifact" plugin to do that.
所以,以为我可以使用“复制工件”插件来做到这一点。 But I can't really get past this thing where it creates a full directory structure here.
但我真的无法通过这里创建一个完整的目录结构。 I just wan "MySpecialProject.framework" to be the top-level artifact.
我只是想将“MySpecialProject.framework”作为顶级工件。
Thanks in advance. 提前致谢。
I fixed my own problem, by putting in an "Execute Shell" command: 我通过输入“执行Shell”命令修复了我自己的问题:
mv ios/build/Release-iphoneuniversal/MySpecialProject.framework .
Then in the post-build action, "Archive the artifacts", I was able to just archive "MySpecialProject.framework/**" 然后在后期构建操作“归档工件”中,我能够归档“MySpecialProject.framework / **”
This seems to work quite well. 这看起来效果很好。 Since each time Jenkins runs the job, it creates a new workspace, I don't have to worry about issues with "mv".
因为每次Jenkins运行这个工作,它都会创建一个新的工作区,我不必担心“mv”的问题。 Works fine.
工作良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.