To say that it has been a painful experience would be an epic understatement.
I felt that sharing my experience might makes things easier for anyone else looking to setup something similar. This post covers the initial setup, but if I have time (and I remember) I'll publish a follow up.
Setup Go Server
Setting up Go Server was pretty straight forward (naturally went with Digital Ocean).
# Install prerequisites apt-get install openjdk-7-jre-headless unzip git # Get package wget http://download01.thoughtworks.com/go/13.4.1/ga/go-server-13.4.1-18342.deb # Install package dpkg -i go-server-13.4.1-18342.deb
At that point, you'll be able to connect to the Go web UI.
The next step was to configure authentication (since by default it's disabled). Go seems to lean towards using an LDAP server for auth, but that's overkill for my use case, so I'll have to use a password file instead.
# Create the password file touch htpasswd # Add a user (will be prompted to enter password) htpasswd -s /opt/goci/htpasswd <username>
Building an iOS App
Getting to this point has been fairly painless, but here's where things began to get murky.
Approach 1 - Using
I spent many fruitless hours tying to coerce Go in driving the xcodebuild tool. Ultimately, I ended giving up and moving onto xctool where I finally had a breakthough.
In hindsight, the issues was probably the same one that I initially had with xctool (i.e. not usually manually created schemes), although I haven't bothered trying.
Approach 2 - Using
For reasons I can't explain, Go won't accept arguments to xctool in the way that you'd expect.
After many frustrated attempts I stumbled upon this blog post which included a number of alternative ways to specify custom commands.
I had to call bash and pass in the commands as arguments to that.
-c /Users/administrator/tools/bin/xctool -project myapp.xcodeproj/ -scheme automated -sdk iphonesimulator build
- Provisioning Profiles and Certificates
- Building the IPA
- Uploading to HockeyApp
- OCLint Integration