在Ubuntu Linux上使用Jenkins构建iOS项目 [英] Building iOS project with Jenkins on Ubuntu Linux

查看:1093
本文介绍了在Ubuntu Linux上使用Jenkins构建iOS项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu中安装了Jenkins,当我尝试在Jenkins中构建iOS应用程序时,出现以下错误:

I have installed Jenkins in Ubuntu and while I am trying to build an iOS app in Jenkins the below error occurs:


致命:无法使用配置的路径/ usr / bin / xcodebuild找到xcodebuild。

FATAL: Cannot find xcodebuild with the configured path /usr/bin/xcodebuild.


推荐答案

xcodebuild 工具是来自Apple的Xcode SDK的一部分 - 它只能在Mac OS X上下载。

您不能简单地使用官方iOS工具在未运行OS X的计算机上构建。

The xcodebuild tool is part of the Xcode SDK from Apple — it's only available for download on Mac OS X.
You cannot simply use the official iOS tools to build on a computer that isn't running OS X.

这意味着,如果您有一个构建iOS应用程序的Jenkins作业,必须在Mac上构建。

This means that, if you have a Jenkins job which builds an iOS app, it must be built on a Mac.

然而,意味着Jenkins必须安装在Mac上。 Jenkins支持分布式构建,您可以拥有多台具有不同操作系统的计算机,并且可以指示Jenkins在哪台机器上运行某个版本。

This does not mean, however, that Jenkins must be installed on a Mac. Jenkins supports distributed builds, whereby you can have multiple machines, with different operating systems, and you can instruct Jenkins on which machine a certain build should run.

例如,因为你已经有一台Ubuntu机器作为你的Jenkins主服务器,你可以简单地将Mac添加为构建节点。然后,Jenkins master将通过SSH与构建节点(Mac)进行通信。在该构建节点的配置中,您应该添加一个标签,例如xcode,表示已安装Xcode SDK。

For example, as you already have a Ubuntu machine as your Jenkins master server, you can simply add a Mac as a build node. The Jenkins master would then communicate with the build node (Mac) via SSH. In the configuration for that build node, you should add a label, e.g. "xcode", to signify that the Xcode SDK is installed.

在Jenkins作业配置中,有一个名为限制此项目可以运行的位置的选项,其中你可以告诉詹金斯它可能只在具有给定标签的节点上构建这个作业。在这种情况下,您只需输入xcode,作业将始终在适当的Mac上构建,而不是在Ubuntu机器上构建。

In the Jenkins job configuration, there is an option called "Restrict where this project can be run", where you can tell Jenkins that it may build this job only on a node with a given label. In this case, you would just enter "xcode", and the job would always be built on an appropriate Mac, rather than on the Ubuntu machine.

这篇关于在Ubuntu Linux上使用Jenkins构建iOS项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆