Using Octopus Deploy to trigger a Phonegap Build?

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

  1. run tests
  2. package the required files as a .zip (currently this is done with MSBuild)
  3. 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 :slight_smile:

Has anyone done this before, or have any bright ideas?


Hi Dan,

I think you’d need:

  1. to bundle your ZIP into a NuGet package. The package file would just contain the ZIP file and:
  2. 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:

<?xml version="1.0"?>
<package xmlns="">
    <description>A description...</description>
    <file src="*.zip" target="" />
    <file src="Deploy.ps1" target="" />

You’d call 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,