VSTF build and release confusion
Hi,
I'm having trouble working out how ReadyRoll will integrate with our VSTF build and release process - I'm totally new to ReadyRoll so hopefully it's my own inexperience which is the problem.
We currently have a build process that works fine and a release process that is creating a web application and an empty Azure SQL database (these are for running end to end and acceptance tests and will be taken down after testing).
The app and database do not exist until after the build process - what I'm having trouble with is that ReadyRoll appears to requires us to specify a target database in the build process (we are using the ReadyRoll nuget package) and this database will not actually exist until after the release process has run.
Am I missing something simple here or do we actually have to have a test database already up and running before the build runs?
I'm having trouble working out how ReadyRoll will integrate with our VSTF build and release process - I'm totally new to ReadyRoll so hopefully it's my own inexperience which is the problem.
We currently have a build process that works fine and a release process that is creating a web application and an empty Azure SQL database (these are for running end to end and acceptance tests and will be taken down after testing).
The app and database do not exist until after the build process - what I'm having trouble with is that ReadyRoll appears to requires us to specify a target database in the build process (we are using the ReadyRoll nuget package) and this database will not actually exist until after the release process has run.
Am I missing something simple here or do we actually have to have a test database already up and running before the build runs?
Tagged:
Comments
You shouldn't need to specify the TargetDatabase build parameter, because this is only needed for generating the diff report and the patch script. These artifacts are useful for previewing what changes/scripts are going to be applied to a specific environment -- most users tend to choose Production as a target.
As long as you run the steps that create your database before the Deploy ReadyRoll Database Package step in your release definition, everything should work just fine.
See this article for more information.
Redgate Software
The parameter 'Target SQL Server Instance' is causing the process to error.
The input box is asking for the fully qualified SQL server instance name.
i.e. as an example this would be 'oursqlserver.database.windows.net'. When we put the fully qualified name in the ReadyRoll database deployment step fails with the error:
and the sqlcmd that produces this error is as follows:
If we run sqlcmd ourselves with the above database server, database name and username (and add the password) we can connect and query the database fine.
When we change the parameter 'Target SQL Server Instance' to the first part of our server name 'oursqlserver' (as the above error suggests we should?) we get the following error:
and the sqlcmd that produces this error is as follows:
This will not connect to the database if we run sqlcmd with these shortened form of the server name.
So - is there something obvious we are missing?
Any help on solving this would be most appreciated.
There's something you're missing, but it isn't obvious. When connecting to Azure, you need to specify the username in the format username@servername (the error message suggests this, but it's not very clear). You must have missed this bit of the documentation article I shared in my previous message:
In your example, this would be: adminusername@oursqlserver.database.windows.net
Redgate Software