Continuous Deployment System - system

We have just set up TeamCity to build all of our projects and we need a system to deploy them to our staging and testing servers. The projects are ASP.NET. We also need to deploy our databases, is there something out there that can do this?
Thanks in advance. Help is much appreciated.

This looks like it would cover the deployment of the ASP.NET application code from TeamCity
As for databases, I am assuming you mean setting up TeamCity to run new database migration scripts. You can run post build events in TeamCity but it depends on how you configure the build. If you use MSBuild for instance you can do something like this. The other build runners like Nant should have something similar. Hope this helps

Related

Azure Pipeline build multiple solutions "checkin" build

I am moving from "XAML" builds to DevOps YAML builds and trying to replicate what I had in TFS 2012. In the XAML build I had several "Solutions" in the "Items to build" and this build was triggered on any checkin. From what I can tell the Pipeline was designed to build a single solution. I've "unlinked" the Pipeline from a single solution and was planning on adding additional Build Tasks for each solution to build. Is this the proper way? If this is not the best way to do this I'm open to suggestions. Using Azure DevOps 2019 and Visual Studio 2017.
Theoretically, you are able to do this. If you manage to do this with if's or something like that, you have to add multiple tasks - to each solution. You have to deal with triggers, finally your yaml file would be unmaintainable. YAML script would be huge and difficult to understand the dependencies.
I would suggest you just use a single file for each solution build. You are able to have many of .yml files all targeting different solutions.
Multiple YAML build pipelines in Azure DevOps
Can I have multiple build pipelines for the same repository?
Besides, since you are moving from "XAML" and not familiar with this build process. You can always use the Designer approach and pull out the system generated YAML if you are new to the system. Here's the YAML schema reference that might help you!!!

How to get Selenium tests to run after deployment in visual studio team services

I am having an issue getting selenium end to end tests to work after an automated deployment using visual studio team services (VSTS).
I have a build working that generates a build artefact. This is triggered from VSTS but runs on an on premises build server. I have a deployment working that deploys to an on premises development web server. All this works including unit tests running after the build.
When I try to add testing after the deployment is when I run into the problem. The tests are to be run on the build server and point to the dev server website. The deployment has two phases. A deploy and then an agent phase that runs a test assemblies task using the build agent on the build server. The problem seems to be that the test dll's are not being included in the build artifact and so are never found when the test process runs. Deploy setup us as follows.
I have a copy files before the publish artifact in the build definition that seems to copy the files in to the right place but they are not included in the zip file artefact. I've looked at several websites and posts on here but I still seem to be missing a vital bit of knowledge that will get this working.
Use of the log did help as recommended so thanks for that.
I have managed to get this working. I separated the selenium tests out into a separate solution and built that separately creating it's own build artefact. I then added this to the agent task in the deploy. This worked. The only thing I need to get sorted now is the correct search path to find the test DLL's. It's not quite as dynamic as I would like at the moment. I can play tunes on that until I get it right though.
I accept this is working around rather than solving the original problem but needs and timescales must. I think moving the end to end UI tests out of the main solution makes sense anyway but no doubt others may think differently.
Thanks for your help everyone

Hudson with MSBuild and MSTest, how to get code coverage

Do you have some opinion for code coverage in Hudson.. Now i have build with Msbuild and MSTest and that's work.
But for code coverage, i think i need some help. I have searched that somebody use nCover another with Emma. Which one is better and more easier ? And maybe reference to help me.
Best regard,
Are you .NET (NCover) or Java (Emma) or both?
NCover should work with Hudson but costs
Open Source projects exist look for PartCover and more recently OpenCover.
All three .NET tools support command-line and as such they should integrate with Hudson.
We are currently using dotCover by JetBrains. It's cheaper than NCover and it integrates well with Visual Studio. You don't have to use a separate application (NCover Explorer) to view your code with the covered/uncovered highlighting, which is great.
The command line version of dotCover allows you to create XML files of the analysis and you can parse the XML via <XmlRead> (in the MSBuild Community Tasks library) to parse the output.
It takes a while to get set up properly, but it works.

How can I automatically upload a release into Codeplex?

I'm imagining something like
msbuild /t:CodeplexRelease
which would build, then upload the outputs to the specified Codeplex project.
Has anyone done this?
Here's documentation on using the "CodePlex MSBuild Tasks" for creating and uploading files for a new release: http://codeplex.codeplex.com/wikipage?title=CodePlexMSBuildTasks&referringTitle=CodePlexAPI
Setting up a continuous integration server for a CodePlex project
SNAK - The Simple NAnt Acceleration Kit
Getting Continuous Integration Working With CodePlex: Part III
that should get you started.
You might be able to write a task that uses WatiN or Selenium, but as far as I know CodePlex doesn't have an API for such automated tasks.

nightly build and virtual machines

At my place we are writing server side applications (WCF services) and we are looking forward automate the installation and run it in our nightly build process...
Moreover, we are looking forward installing it again and again on different servers...
We are searching for:
what is the best tool for nightly build?
(we are currently using TeamCity, but it is only good for CI not for the Nighty Build requirements)
Is there anyone who build its solutions\projects and install them on Virtual-Machines?
(Can you attach\link some automated code for this installation?)
Thanks.
Have a look at FinalBuilder
TeamCity is a great tool. It supports scheduling a build like CC.NET for nightly builds. What kind of issues are you having with it?
Try NAnt for the build:
http://nant.sourceforge.net/
and CruiseControl.NET for the continuous integration:
http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET
both are open source :-D
TeamCity will cope with nightly builds just as well as CC.Net etc.
Your comment
As far as I see this TC good enough
for CI not for NihgtlyBuild. Because
we cannot configure to install
windows-services, install on remote
machines, of course we can use Msbuild
but it will be hard to write all of
this.
It isn't particularly difficult to do any of this (IMO of course) using Microsoft.SDC.Tasks