TeamCity iPhone Build Agent doesn't work until manually restarted
I'm using the following build script.
http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
It works just fine if I start up the build agent manually (either using agent.sh or running the launch daemon manually from terminal).
Eventually I'll start getting errors regarding the Provisioning Profile Certificates.
[10:40:03][Step 1/2] Starting: /Library/TeamCity/buildAgent/temp/agentTmp/custom_script7798470032061763046
[10:40:03][Step 1/2] in directory: /Library/TeamCity/buildAgent/work/9891710001721542
[10:40:03][Step 1/2] **** Validate Keychain
[10:40:03][Step 1/2] Available provisioning profiles
[10:40:03][Step 1/2] 0 valid identities found
But it seems like every week I have to restart the agent manually (typically I'll just unload and load it again).
That seems to resolve the issue.
[10:44:08][Step 1/2] Starting: /Library/TeamCity/buildAgent/temp/agentTmp/custom_script5361444217874294789
[10:44:08][Step 1/2] in directory: /Library/TeamCity/buildAgent/work/9891710001721542
[10:44:08][Step 1/2] **** Validate Keychain
[10:44:08][Step 1/2] Available provisioning profiles
[10:44:08][Step 1/2] 1) ****** "iPhone Developer: James Ashworth (*****)"
[10:44:08][Step 1/2] 2) ****** "iPhone Distribution: **********"
[10:44:08][Step 1/2] 2 valid identities found
Not really sure what other information I can give here to help. I can reproduce the issue by restarting the build machine (mac mini).
Please sign in to leave a comment.
Hello,
Please check what environment variables are set on the build process when the script fails.
There could be some builds that polute environment or touch files affecting this script.
To check environment you may add one more build step that would dump actual environment to console
What build step would dump the actual enviroment (and i assume variables) to console?