酢ろぐ!

カレーが嫌いなスマートフォンアプリプログラマのブログ。

Lion+Xcode 4.3.2にアップデートしたらJenkinsでビルド出来なくなった

お仕事上の都合でSnow Leopardを使い続けてきましたが、ようやくLionに乗り換えることが出来るようになったので、合わせてXcodeも4.3.2にアップデートしました。途端にJenkinsさんが仕事をしてくれなくなりました。

結論から言うとターミナルから2つのコマンドを実行する必要がありました。

まずはひとつ目のエラーメッセージ。

[workspace] $ /usr/bin/xcodebuild -version
Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.
FATAL: Check your XCode installation. Jenkins cannot retrieve its version.
Build step 'XCode' marked build as failure

Developerディレクトリにxcodeが居ないことを怒っているようです。Xcode 4.3からはアプリのインストールパスが変更になったのでDeveloperディレクトリを参照してはいけません。Xcodeがどこに在るかを指し示します。

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

次のエラーメッセージ。

Going to invoke xcodebuild:target: XXXXXXXX, sdk: iphonesimulator, project: XXXXXXXX.xcodeproj, configuration: Debug, clean: YES, symRoot: DEFAULT, configurationBuildDir: DEFAULT
[workspace] $ /usr/bin/xcodebuild -target XXXXXXXX -sdk iphonesimulator -project XXXXXXXX.xcodeproj -configuration Debug clean build

You have not agreed to the Xcode license agreements, please run xcodebuild standalone from within a Terminal window to review and agree to the Xcode license agreements.
Build step 'XCode' marked build as failure

Xcodeのライセンスを認証してくださいと怒られているようです。利用規約を読んだ上で「agree」と入力する必要があるようです。以下のコマンドでXcodeの利用規約を読む事ができます。

sudo xcodebuild -license

ちゃんと適切なタイミングでagreeを入力してくださいね。これで引き続きJenkinsさんが働いてくれるようになります。