Build and Deployment Config Database Tests Connection String with RoundhousE

blake's Avatar

blake

10 Apr, 2019 07:21 PM

I have a visual studio 2017 solution that contains a dot net core 2.2 web app and webjob. My app works locally and now I need to create an AppVeyor build plus deployment to Azure Web App.

The solution has database integration tests that will need to run on AppVeyor so my primary question is: Where do I store and configure the connection strings for the different environments (e.g. build/test and production)?

One other note...I want to use RoundhousE for my app's db management so I'll be "kicking" my db with every build to make sure all scripts have been run correctly. Obviously db connection info will be needed there, as well.

Thank You!

  1. Support Staff 1 Posted by Ilya Finkelshte... on 10 Apr, 2019 09:21 PM

    Ilya Finkelshteyn's Avatar

    If you deal with Azure App Service, you can store all secrets in their App Settings. Watch this video which is quite old but has a good explanation. Or you can google Azure App Service App Settings and get a lot of articles.

    Regarding integration testing, for me it is easier to do it locally on AppVeyor build VM, using built-in services.

  2. 2 Posted by blake on 11 Apr, 2019 05:05 AM

    blake's Avatar

    Thx. Initial build seems to be working now with automated localdb integration testing; and the Azure app settings for db connection string should work fine once I get it deployed...which is my current issue.

    I'm working on my Environment deployment settings. I think Web Deploy should work but I also need to run a RoundhousE (rh.exe tool) command before deployment that will execute one or more SQL scripts on the product db server. The SQL script(s) are checked in and executed by rh. How can I run my sql scripts as part of deployment?

  3. Support Staff 3 Posted by Ilya Finkelshte... on 11 Apr, 2019 02:10 PM

    Ilya Finkelshteyn's Avatar

    For deployment to Azure App Service, I would recommend Zip Push deploy -- it was implemented relatively recently as a replacement for Web Deploy.

    Unfortunately we do not support custom scripts in Environment deployment at the moment. Workaround is deployment project.

  4. Ilya Finkelshteyn closed this discussion on 11 Jun, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac