I'm deploying a test application to AppHarbor and I'm trying to have AppHarbor update the configuration variables for the ElephantSQL add on when deploying.
These questions did help resolve my issue:
My AddOn Configuration Variable - Key: ELEPHANTSQL_URL
My Custom Configuration Variable - Key: foo Value: bar
Now looking at the AppHarbor documentation all I should have to do is set an appsetting to have the same name as the key above.
So here's my web.config:
<connectionStrings>
<add name="ELEPHANTSQL_URL" connectionString="Server=localhost;Database=foo;User Id=bar;Password=baz;" providerName="Npgsql" />
</connectionStrings>
<appSettings>
<add key="ELEPHANTSQL_URL" value="dev"/>
<add key="foo" value="baz"/>
</appSettings>
And here's my web.release.config (which has been set to Build Action: Content)
<connectionStrings>
<add name="ELEPHANTSQL_URL" connectionString="release" providerName="Npgsql" xdt:Transform="Replace" />
</connectionStrings>
<appSettings>
<add key="ELEPHANTSQL_URL" value="release" xdt:Transform="Replace" />
<add key="foo" value="release" xdt:Transform="Replace" />
</appSettings>
I would expect to see the release values in the web.config, but when I download the build source, I continue to see the dev values. Everything I have read says that appharbor deploys the release configuration and executes the transforms, but I cannot get it to work.
In the build log, there is no mention of the transformation, and I'm not sure if that's normal (see below).
Time Message
8/12/15 9:18 PM Received notification, queuing build
8/12/15 9:19 PM Downloading source
8/12/15 9:19 PM Downloaded source in 0.48 seconds
8/12/15 9:19 PM Starting NuGet package restore
8/12/15 9:19 PM NuGet package restore completed Show Log 8/12/15 9:19 PM Starting build
8/12/15 9:19 PM 0 warnings
8/12/15 9:19 PM Build completed in 3.9 seconds Show Log 8/12/15 9:19 PM Starting website precompilation
8/12/15 9:19 PM Precompilation completed in 11.24 seconds
8/12/15 9:19 PM Starting tests
8/12/15 9:19 PM Tests completed in 1.94 seconds
8/12/15 9:20 PM Deploying build
8/12/15 9:20 PM Website root content retrieved Show Log 8/12/15 9:20 PM Build successfully deployed
Here is the web.config in the build download:
<connectionStrings>
<add name="ELEPHANTSQL_URL" connectionString="Server=localhost;Database=foo;User Id=bar;Password=baz;" providerName="Npgsql" />
</connectionStrings>
<appSettings>
<add key="ELEPHANTSQL_URL" value="dev" />
<add key="foo" value="baz" />
</appSettings>
I'm not sure what I'm missing.
Ideas?