Jenkins 构建失败:Xcode 找不到匹配的配置文件

Jenkins Build Failed : Xcode couldn't find a provisioning profile matching

我在 Ubuntu 的 Aws 实例上安装了 Jenkins Master 运行ning 并创建了 mac 笔记本电脑作为从机,当我 运行 在 mac loptop 构建成功,但是当我从 Jenkins 触发它时,它给出了。

     error : 

        Check dependencies : No profiles for 'com.xyz.abc' were found: Xcode couldn't find a provisioning profile matching 'com.xyz.abc'. Code signing is required for product type 'Application' in SDK 'iOS 10.2' 

* ARCHIVE FAILED * The following build commands failed: Check dependencies (1 failure) Build step 'Xcode' marked build as failure.

Ps :

我已经尝试阅读以前的 post 但他们中的大多数都在 MAC 上使用 Jenkins 运行ning,xcode 也是 运行ning在同一台服务器上,这不是我的情况。

因为我能够 运行 我的项目 xcode 我觉得我的代码签名和配置文件是正确的。此外,现在我可以使用创建 IPA Xcode 选项:

产品 --> 在 Mac 笔记本电脑

中的 Xcode 中存档

那为什么 jenkins 不能创建 ipa 呢?

我也将 login.keychain 中的所有键移至 system.keychain

我已经使用 java slave-agent.jnlp

将 jenkins master(ubuntu) 连接到 slave(mac)

Jenkins 控制台输出:

============================================= ============== == 可用的配置文件 [ios] $ /usr/bin/security find-identity -p codesigning -v

27) XXXXX "Mac Developer: Ashish Karpe (YYYYY)"

这与 mac 笔记本电脑中的 xcode 相似,所以我无法弄清楚她出了什么问题!

最后我得到了解决方案,现在我可以看到我们可以使用 MAC 笔记本电脑作为从机从 Jenkins Master(Ubuntu AWS 实例)构建 IPA。

我的错误是创建了太多配置文件。我 Xcode 在 Mac 笔记本电脑上使用了一个工作正常的配置文件(10 位开发团队 ID),所以我在 Jenkins 端使用了相同的配置文件但失败了!

此外,当我在 Jenkins master 上配置 Provisioning 配置文件并尝试使用对我有用的另一个 10 位开发团队 ID 时,Jenkins 显示了所有检测到的配置文件。

总而言之,现在我可以使用 Jenkins build 创建 IPA,但我不确定为什么我的配置文件在 Xcode 中有效但在 Jenkins 中无效。

因为,我的任务是在此处将其标记为答案,以防万一其他人遇到类似问题,他可以尝试使用 10 位开发团队 ID 来使其正常工作!

希望这对我很沮丧并且开始讨厌 IOS 部署的人有所帮助!