xcodebuild fails when run from Jenkins (works in terminal)

拈花ヽ惹草 提交于 2019-12-03 06:30:18

I am using Xcode 5.0.2 (5A3005) and I am building with xcodebuild from command line as well, without using Jenkins plugin or the IDE.

One note: Jenkins creates a new set of environment variables for each build step. Any new environment variables created in a certain build step are not replicated in the next build step. There are ways around it (but that is currently not your question). If your export command is running in a separate Execute Shell build step from your xcodebuild command, then it is has no affect.

Here is something to try:
On command line, type xcode-select -p.
Then type set Copy paste the output to a good text editor that can diff

Then run a Jenkins job, and in Execute Sell build step, use the same commands:
xcode-select -p set Copy paste the output to a good text editor and than diff the two files.

Firstly, compare the output of xcode-select -p is same.
Then, apart from extra variables in the Jenkins execution (such as $BUILD_NUMBER, etc), there should be no differences.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!