简体   繁体   English

Jenkins,我如何归档一个子目录(没有上面的整个树结构)?

[英]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.

相关问题 如何在没有存档的情况下符号化但具有.dsym文件? - How can I symbolicate without archive but have .dsym files? 如何将Fastlane构建添加到Xcode的存档组织器中? - How can I add fastlane builds to Xcode's archive organizer? 如何刷新UITableViewCell中的单个按钮,而不是刷新整个表或整个单元格? - how can I refresh a single button in UITableViewCell instead of refreshing whole table or whole cell? 如何通过后缀CFBundleShortVersionString动态获取“存档名称”(在“编辑方案/存档/存档名称”中)? - How can I get the “Archive Name” (in Edit Scheme/Archive/Archive Name) dynamically with the CFBundleShortVersionString in suffix? 如何创建在Xcode中存档的快捷方式? - How can I create a shortcut to archive in Xcode? 如何在没有开发人员证书的情况下在Xcode中归档我的项目? - How to archive my project in Xcode without a developer's certificate? 我是否可以在不更改整个文件结构/ Xcode项目的情况下更改Cordova / iOS应用程序的“显示名称”? - Can I change a Cordova/iOS app's “displayed name” without changing the entire file structure/Xcode project? 如何在UISearchBar上方显示内容? - How can I display content above UISearchBar? 如何在键盘上方添加工具栏? - How can I add a toolbar above the keyboard? 如何将存档手动添加到Xcode 8的组织器? - How can you manually add an archive to Xcode 8's organizer?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM