0
votes

How Can I used shared runner to build my iOS project from the git pipeline?

img_error

Getting error - Executing "step_script" stage of the job script

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

$ xcodebuild clean -project CI-Demo-iOS/CI-Demo-iOS.xcodeproj -scheme CI-Demo-iOS ERROR: Job failed: exit code 127

Steps -

Using window OS to push the gitlab-ci.yaml to git.

gitlab-ci.yaml file has-

script:

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

1 Answers

0
votes

The short answer is you can't, or it depends.

Based on the screenshot you shared, it looks like the GitLab runner is using the docker executor. To build iOS apps, however, you need to use a GitLab runner installed on a Mac.

You can find information on installing a Mac runner in the documentation, and you can find more information on how to use GitLab CI to build iOS apps in a blog post. It's a little old, so some things might be out of date, but the general requirements and methodology is the same.

If you're using GitLab.com, then there is no Mac-based shared runner. You can check out the epic and related issues GitLab is working on towards making one available.

If you're using a self-managed GitLab (not GitLab.com), then you need to talk to the administrator to install a Mac based shared runner.

Alternatively, you can install a runner yourself and connect it to a Gitlab instance.