jenkins - 使用 FaSTLane/Jenkins 生成代码覆盖率

标签 jenkins jenkins-plugins fastlane

我正在尝试通过 FaSTLane 使用 Sonar/Jenkins 生成代码覆盖率。

我用 Jenkins 运行的脚本:FaSTLane 测试。

在我的 fastfile 中我这样做:

desc "Runs all the tests"
lane :test do
  scan(scheme: "XXX-icTests",
    clean: true,
    code_coverage: true,
    output_directory: "sonar-reports",
    output_types: "junit,json-compilation-database",
    buildlog_path: "sonar-reports",
    derived_data_path: "sonar-reports",
    use_clang_report_name: true,
    xcargs: "ONLY_ACTIVE_ARCH=YES"
  )
  slather(
    cobertura_xml: true,
    output_directory: "sonar-reports",
    proj: " XXX.xcodeproj",
    workspace: " XXX.xcworkspace",
    scheme: " XXX-ic",
    build_directory: "sonar-reports",
    ignore:[]
  )
  oclint(
    compile_commands: "sonar-reports/compile_commands.json",
    report_type: 'pmd',
    select_regex: /XXX/,
    max_priority_1: 10,
    max_priority_2: 400,
    max_priority_3: 4000,
    enable_clang_static_analyzer: false,
    allow_duplicated_violations: false,
    list_enabled_rules: true,
    report_path: "sonar-reports/oclint.xml"
  ) 
  sonar
end

但是在模拟器上构建应用程序时,它会停在这里:

enter image description here

在这种情况下可能是什么问题?

感谢您的帮助。

最佳答案

我在 faSTLane 扫描之前使用 next.. 在 shell 脚本上

FASTLANE_EXPLICIT_OPEN_SIMULATOR=2 faSTLane scan --scheme $job

这将触发模拟器

关于jenkins - 使用 FaSTLane/Jenkins 生成代码覆盖率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39105620/

相关文章:

Jenkins Cloudformation 插件 - 无需执行任何更新

android - 创建 3 个安卓模拟器 [phone, tab7, tab10] 并通过 faSTLane 的命令行启动它们

ios - 在没有 Xcode 的情况下添加 Fabric 应用程序 (Twitter)

ruby-on-rails - 使用 Docker 和 Jenkins 运行测试 - 测试结果

selenium - Jenkins 在不打开浏览器的情况下运行 selenium 测试

Git pull 失败,得到 "The remote end hung up unexpectedly",Windows XP Jenkins slave

jenkins - 如何借助 jenkins 远程访问 API 在 jenkins 中安装插件?

ios - 在 Jenkins 上使用 faSTLane 构建失败失败

android - Jenkins 矩阵构建 : how to build once and publish that binary to slaves?

windows - 在 jenkins windows slave 中克隆远程仓库 'origin' 时出错