Thursday, May 27, 2010

Hudson iPhone builds part 3

I ran into some issues with delivering the completed iPhone zip from the Mac, so I ended up creating some separate deploy jobs that take care of it.

1. In the trunk builds I have the 'Build other projects' setting checked and call the deploy job. For branch builds I use the 'Trigger parameterized build on other projects' and choose 'Current build parameters', the reason being that I need to send the branch value to the deploy job.

2. I have the 'Post-build Actions' - 'Archive the artifacts' set for the build job. This takes the zip created by the Mac and archives it locally on the Hudson server. This is critical to the issue with Mac delivery.

3. For the configuration of the deploy job, I have the 'Advanced Project Options' - 'Use custom workspace' setting checked, and list the builds folder of the parent Hudson job that initiates this deploy job. It will find the zip that was archived to Hudson in the previous step. This means that each build needs its own deploy job, which doesn't scale perfectly, but since this is limited to Mac builds it's been working out OK

4. The next step in the deploy job is 'Publish artifacts to SCP Repository' and send it from the Hudson archive location.

5. There is then a job called to delete the zip from the Hudson server. This is because the archive job retains at a minimum two zips (last two successful), and we don't want the deploy job to deliver two. The delete job is called with 'Build other projects'

6. For the delete job the 'Use custom workspace' is using the build home from the original build job but handles the deletes for all jobs. This is one line that's called from the job:

del /s/q \hudson-iPhone*.zip

That's it for the build and delivery, maybe will dive into the iPhone code signing next

No comments:

Post a Comment