詹金斯(Jenkins):fastlane在可可足类中失败

时间:2019-01-08 05:33:07

标签: ios swift jenkins cocoapods fastlane

我一直在努力使可可足类在Fastlane / Jenkins中工作。 这是Jenkins的控制台输出:

[12:40:31]: [32m--- Step: cocoapods ---[0m
[12:40:31]: [32m-----------------------[0m
[12:40:31]: [36m$ bundle exec pod install[0m
+------------------+------+
|      [33mLane Context[0m       |
+------------------+------+
| DEFAULT_PLATFORM | ios  |
| PLATFORM_NAME    |      |
| LANE_NAME        | beta |
+------------------+------+
[12:40:31]: [31mNo such file or directory - bundle[0m

+------+-----------------------+-------------+
|              [32mfastlane summary[0m              |
+------+-----------------------+-------------+
| Step | Action                | Time (in s) |
+------+-----------------------+-------------+
| 1    | default_platform      | 0           |
| 2    | clean_build_artifacts | 0           |
|    | [31mcocoapods[0m             | 0           |
+------+-----------------------+-------------+

[12:40:31]: [31mfastlane finished with errors[0m

[12:40:31]: [33mError accessing file, this might be due to fastlane's directory handling[0m
[12:40:31]: [33mCheck out https://docs.fastlane.tools/advanced/#directory-behavior for more details[0m

在Fastfile的通道中添加cocoapods动作之前,一切都像魅力一样。

2 个答案:

答案 0 :(得分:0)

我最终在如下所示的def main(): myfinal_list, final_count = Function1(list1, count1) Function2(myfinal_list, final_count) 操作中禁用了包。

cocoapods

虽然花了很多时间才发现它。希望以后能对其他人有所帮助。

答案 1 :(得分:0)

如您所见,错误在控制台日志中:

  

没有这样的文件或目录-捆绑包

cocoapods操作是基于基本Fastlane::Action类构建的。我挖了一下,发现如果您有一个Gemfile,fastlane认为它可以使用bundle方法(来自bundler gem)来更快地运行以及更正确的bundle exec pod install

如果您没有使用bundler运行您所使用的Ruby gem的确切版本,我将删除Gemfile,因为它是一个无用的存根。

但是,我强烈建议您使用bundler以确保您始终使用用于开发Fastlane代码的Ruby gems的确切版本。它也更快。 Read more