【问题标题】:How to use Gitlab shared runner for iOS projects如何在 iOS 项目中使用 Gitlab 共享运行器
【发布时间】:2021-06-07 08:18:09
【问题描述】:

如何使用共享运行器从 git 管道构建我的 iOS 项目?

出现错误 - 执行作业脚本的“step_script”阶段

/bin/sh: eval: line 92: xcodebuild: not found

$ xcodebuild clean -project CI-Demo-iOS/CI-Demo-iOS.xcodeproj -scheme CI-Demo-iOS 错误:作业失败:退出代码 127

步骤-

使用window OS将gitlab-ci.yaml推送到git。

gitlab-ci.yaml 文件有-

脚本:

- xcodebuild clean -project CI-Demo-iOS/CI-Demo-iOS.xcodeproj -scheme CI-Demo-iOS

【问题讨论】:

    标签: gitlab gitlab-ci gitlab-ci-runner


    【解决方案1】:

    简短的回答是你不能,或者这取决于。

    根据您分享的屏幕截图,GitLab 运行程序似乎正在使用 docker 执行程序。但是,要构建 iOS 应用程序,您需要使用安装在 Mac 上的 GitLab 运行器。

    您可以在installing a Mac runner in the documentation 上找到信息,您可以在how to use GitLab CI to build iOS apps in a blog post 上找到更多信息。它有点旧,所以有些东西可能已经过时了,但一般要求和方法是一样的。

    如果您使用的是 GitLab.com,则没有基于 Mac 的共享运行器。您可以查看epic and related issues GitLab is working on towards making one available

    如果您使用的是自我管理的 GitLab(不是 GitLab.com),则需要与管理员联系以安装基于 Mac 的共享运行器。

    或者,您可以自己安装运行器并将其连接到 Gitlab 实例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-05-27
      • 2022-11-08
      • 2020-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多