当从命令行运行时,xcodebuild命令给出不同于在Jenkins中运行时的
发布时间:2020-12-15 02:00:22 所属栏目:百科 来源:网络整理
导读:我正在使用Jenkins建立CI系统,并发现构建失败,因为xcodebuild报告当我执行该行时,没有任何方案 -xcodebuild -workspace XXX -scheme NNN。 我不知道为什么会发生这种情况,所以为了消除我的工作空间中的一些东西,我使用XCode创建了一个新的项目模板,发
我正在使用Jenkins建立CI系统,并发现构建失败,因为xcodebuild报告当我执行该行时,没有任何方案
-xcodebuild -workspace XXX -scheme NNN。 我不知道为什么会发生这种情况,所以为了消除我的工作空间中的一些东西,我使用XCode创建了一个新的项目模板,发现我对任何xcodebuild命令和任何工作区/项目的行为都有所区别。 模板项目被称为废料,如果从终端命令行我运行这个命令,例如: xcodebuild -list 它输出 Information about project "scrap": Targets: scrap Build Configurations: Debug Release If no build configuration is specified and -scheme is not passed then "Release" is used. Schemes: scrap 但是如果我从Jenkins内部运行xcodebuild -list,那么输出是: Building in workspace /Users/Shared/Jenkins/Home/workspace/scrap [scrap] $ /bin/sh -xe /var/folders/ph/s6dvlfq9769741g_yzmjlmz000007c/T/hudson3765407964219991487.sh + xcodebuild -list Information about project "scrap": Targets: scrap Build Configurations: Debug Release If no build configuration is specified and -scheme is not passed then "Release" is used. This project contains no schemes. 这是最简单的jenkins工作 – 我所做的就是创建一个新工作,将其设置为一个自由式软件项目,然后添加一个Execut shell的构建步骤,并添加xcodebuild -list命令,就是这样。 为什么xcodebuild说有没有方案呢?为什么在jenkins的时候跑得不一样? 解决方法
认为所有你需要做的是将方案设置为共享。
方案>管理方案 确保选中“共享”。 这将产生一个新的文件夹/文件… / xcshareddata / xcschemes / ???。xcscheme 检查这个文件到你的源代码控制和方案现在应该出现在你的jenkins框。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |