I am planning to introduce gated checkins in TFS 2015 for our project. Our product consists of one database, one web service and one web front-end.
The database “build” and deploy take like 60 minutes. When that is done we generate C# source code for our Web service using meta data in the just deployed database.
We the build the Web server and start it.
Next step we generate C# source code for the Web front-end using the services in our running Web service.
Now, I would like to avoid building and deploying the database whenever possible. I other words I would like TFS to “ask me”, custom script of software” if the database should be built and deployed. This could be done using C# code, perl, python Windows batch file or other scripting/coding, exit code 1 is perform the build, exit code 0 don’t or whatever.
So, basically some feature in TFS that conditionally performs a build. I guess it could be two different builds, one with all steps and one with just Web service and Web frontend build. Please note that the database build is just a set of plain Windows batch files, two files to be precise.
Is this supported in some way?
Related
We are initial stage of bringing devops into our daily activities. Now we are workig on .net and pthon coding. So we have to plan for continuous delivery on our activities.
In the first scenario for python development works, we are using web2py now. So developers can directly access the python files and work and test their webdevelopment work by web2py with certain port.
How jenkins can help here to automate this process and developers should get a easy GUI or way to test or compile their codes before it got deployed o web2py.
Also we need to automate the build activity of .net code as well. What are the best possible ways
I have two web servers that I am testing with some MVC applications. When I create a build definition in Visual Studio I would like to utilize two drop folders (one on each server) but this doesn't seem possible. I know there are a lot of ways around this by manually copying the files, setting up a data replication or creating multiple build definitions but I am looking for the simplest way. Any ideas?
Add a post-build script that will copy the files to the second web server.
The result of a build is always one drop folder, however you will get a subfolder for each web application(look in /_PublishedWebApplications/MyWeb/). As either a post build PowerShell, or as a release management activity you can have both of those web applications deployed to one or more servers.
In the default build template there are place to call PowerShell. You should use the post-test location to call a script that deploys your apps.
If you have a progression of environments, like dev->qa->prod, then you can use the release management tool to create a pipeline for each or both of your applications.
I have several websites that I manage for a company and they want me to transition to TFS. As part of their policy, I can only deploy files that have changed since the last deployment. I.e. if a view has changed then it gets deployed, if it has not changed then it not part of the deployment package. They use automated tools for the deployments.
Currently I use a custom tool I wrote that hooks into my local source provider (Vault Pro) and finds all the changes from a given date and copies those files to a zip file.
How can I accomplish something similar with Team Foundation Server?
TFS provides you with an SDK that you could use to query it from code. Here's the documentation of the client API.
I'm trying to put together an automated deployment strategy for my company's .NET application. We are using TFS/VS 2010, along with IIS for application hosting and msbuild for continuous integration & deployment. The application consists primarily of two components:
* A webapp
* A database
Our branching strategy, for the moment, is single-stream. That is, we have one big 'ol trunk, and for now we can assume that it will remain that way.
We've figured out how to get msbuild to deploy the webapp to IIS, so that's cool. Now I'm trying to figure out the best strategy for handling deployment of the database component. Right now, database deployment is entirely manual: our db architect builds the db on his machine periodically, examines the auto-generated migration script, and then manually writes pre/post deployment scripts. Then, he runs the whole deployment and sends an email to everyone.
This is not an ideal solution: the automated nightly webapp deployment works great, except when the dba fails to coordinate his manual db deployment work. This results in a lot of headaches for all parties. Thus, I'm trying to figure out how feasible an auto-deployment of the db will be.
I understand how to make msbuild deploy a database. However, the bigger problem seems to be properly managing pre/post deployment scripts.
With all this in mind, can anyone point me to best practices in this kind of a situation? I've done a lot of config mgmt in the past, but am new to managing a project with a database component.
we use the Visual Tool VSDBCMD to compare 2 databases and generating update sql scripts
http://msdn.microsoft.com/en-us/library/dd193283.aspx
We're using this process to use WebDeploy to deploy and compile two web sites that are a part of the solution. The approach we took was found here:
http://vishaljoshi.blogspot.com/2010/11/team-build-web-deployment-web-deploy-vs.html
But it's only deploying one of the web sites; is there a way to tell it to publish both?
Thanks.
Web Packages created based on the above walkthrough (i.e. via VS 2010 and its derivatives like TFS etc) can only contain one web project. Unfortunately VS generated Web Packages will be limited from this sense. If you use Web Deploy (MSDeploy) EXE or API directly and then you can package more than one web site within IIS etc. I believe you are trying to accomplish this via Team Build so that is not really an option.
Although, in Team Build you can create more than one build definitions to cause multiple packages to be created. You can also set properties in your .csproj or .vbproj file (same properties mentioned in Step10 of the walkthrough). If more than one project have properties DeployOnBuild set to be true then from within single solution build within TFS you can have multiple web packages generated. You will still have to deploy each web independently.
Hope this helps