Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Has anyone solved the deployment pipeline problem? [DevOps]

$
0
0

I'm a purist at heart and DevOps is a passion of mine. One principle that I hold near and dear is the idea that an assembly should be built (compiled) once and then deployed to the various environments. This keeps your build versioning clean, and helps you identify where something went wrong because the build number is perfectly unique.

Let's take an example of an app that relies on an external Restful API.

In a typical .NET application, I'll build my dll as release, and then as I deploy it to dev, I'll update the app.config to point to the dev ApiUrl.
As I promote the application to qual/test, I'll do another xml config update, pointing the ApiUrl to the test endpoint.
Finally, I promote the application to production, and I do a final xml config update, and I point the ApiUrl to the production API.

Now, we have our wonderful Xamarin Forms application, and the concept of xml config is lost when we package the application. I don't want to re-compile the application per environment as that defeats the "Build it once" principle.

So has anyone solved this? For dev, I can just use a standard #ifdev

#if DEBUG
    ApiUrl = "dev.myapp.com";
#endif

This is easy. It gets trickier when we use HockeyApp for our Qual/Test environment. I need to rely (somehow) on the tooling to indicate where the app came from. I've asked if the do anything like that, but am still awaiting a response.


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>