I’m looking for a way to use our existing TeamCity/Octopus environment to take a .zip file and send it to PhoneGap Build, using Octopus Deploy.
Right now this is what I’m thinking, but there has to be an easier way.
I know that PGB needs a .zip file with the contents of the www folder and the config.xml in there. So I was thinking my TeamCity build steps might look like this
- run tests
- package the required files as a .zip (currently this is done with MSBuild)
- some magic happens such that Octopus can version this zip and send it off to PhoneGap Build
Somewhere in there I feel like I’m missing NuGet, or OctoPack or some such. Currently stuck on Step 3
Has anyone done this before, or have any bright ideas?
I think you’d need:
- to bundle your ZIP into a NuGet package. The package file would just contain the ZIP file and:
- a Deploy.ps1 file that sends the ZIP to PhoneGap
You don’t need OctoPack for this, but you will need NuGet.exe.
Your NuSpec file would be pretty short:
<file src="*.zip" target="" />
<file src="Deploy.ps1" target="" />
Nuget.exe pack Your.nuspec -Version %build.number%` from TeamCity to package up the files. Then you’d publish it to your build server (or include it as an Artifact in TeamCity which will make it available in the TeamCity NuGet feed). Note that TeamCity has a build runner in it for creating NuGet packages.
Hope that helps,