tag:support.appharbor.com,2010-11-23:/discussions/problems/82723-nunit-32-support-deploying-from-teamcityAppHarbor: Discussion 2016-06-16T02:37:40Ztag:support.appharbor.com,2010-11-23:Comment/400116212016-06-01T09:31:10Z2016-06-01T09:31:10ZNUnit 3.2 Support / Deploying from TeamCity<div><p>We migrated our NUnit suite to 3.2 recently and it appears to me
Gallio/AppHarbor can't run those. I know it must be a huge pain for
you to maintain the build system, so I was wondering whether
there's an easy way to deploy our binary assets from TeamCity to
AppHarbor (e.g. can you point me to a script/step?).</p>
<p>We run TeamCity anyway for internal CI anyway, so it would make
sense for us to maybe integrate AppHarbor on another level instead
of pushing source. Using mercurial/git to push binaries feels a bit
wrong to me, but maybe that's just me. What would you
recommend?</p></div>rowinginmotiontag:support.appharbor.com,2010-11-23:Comment/400116212016-06-02T06:04:29Z2016-06-02T06:04:29ZNUnit 3.2 Support / Deploying from TeamCity<div><p>Hi,</p>
<p>I think there are a few customers that have made a custom
integration with TeamCity using an intermediate app for integrating
AppHarbor's build API and TeamCity web hooks. I don't have code or
a script for this, but will try and see if I can find the customers
who are doing this and ask if they're willing to share it.</p>
<p>In any case I think it's a good idea to provide more integration
points for third-party and on-premise CI setups. It'd likely also
be fairly straightforward as AppHarbor supports prebuilt
applications -- if no solution file is found in a source tarball
AppHarbor will <a href="https://support.appharbor.com/kb/getting-started/build-process-and-solution-file-convention">
attempt to deploy the app as-is</a> assuming that the root
directory contains a web application (so the
<code>web.config</code> should be in this root directory of the
artifact archive).</p>
<p>As far as I can tell these are the steps that are required to
integrate AppHarbor with TeamCity:</p>
<ol>
<li>Deploy an application that responds to a TeamCity Webhook
notification (there are a few <a href="https://confluence.jetbrains.com/display/TW/TeamCity+Plugins">plugins
for that here</a>) and notifies AppHarbor about the build to deploy
using <a href="https://support.appharbor.com/kb/api/builds-api-2">the Build
API</a>.<br></li>
<li>Make sure that AppHarbor can fetch the build artifact (for
instance by allowing access remotely from the intermediate app, or
from AppHarbor's build servers).<br></li>
<li>Configure TeamCity to invoke the intermediate application's
upon a successful build.</li>
</ol>
<p>TeamCity already allows you to download <a href="https://confluence.jetbrains.com/display/TCD9/Patterns+For+Accessing+Build+Artifacts#PatternsForAccessingBuildArtifacts-ObtainingArtifactsfromanArchive">
a tarball artifact using a REST API</a>.</p>
<p>Another approach would be to include an
<code>AppHarbor.sln</code> file in your repository that doesn't
reference the test projects. TeamCity <a href="http://stackoverflow.com/a/32249471/324180">could then push your
repository</a> to the AppHarbor repository after a successful build
and test execution, which would in turn cause AppHarbor to build
and deploy the app (without the excluded tests). The advantage of
this solution would be that it doesn't require a publicly
accessible service for the tarball, and AppHarbor can produce the
build artifact. The later may be an advantage if there are
differences between your TC environment and AppHarbor's
build/application servers and make sure that an app with unmet
dependencies won't be deployed.</p>
<p>I'll look into whether some code/script already exists for
accomplishing this, and how/when we can support such an integration
"natively" -- just wanted to share my thoughts on this in case it's
useful or you have any feedback!</p>
<p>Best,<br>
Rune</p></div>rune