Release Management and Distributing regular updates - provisioning

I have a .NET application that I am distributing regularly through an .exe and .exe.config. Rather than sending around the executable to team members every time there is an update (which is often), is there any way to check for updates when they launch the app? I see this in most Desktop applications but not sure how it's done. Can I integrate with our VS Team Services repository?

VSTS can’t check updates when the app is launching. But you can use VSTS CI ( continuous integration) build and CD (continuous deployment) release to update the app before it launching.
Detail steps as below:
Push your code in VSTS repo (Git or TFVC).
Such as you can create a git repo on VSTS, and then clone/commit/push changes to the remote repo.
Add a CI build for your project.
You can use ASP.NET template or add tasks manually to define what you want to build. For Triggers, you can trigger the CI build when changes are pushed in your repo, or you can use schedule trigger to build your code for certain time specified.
Trigger release by CD so that the latest app is deployed to the machine(s) you use.
Add a release with your build definition and CD selected. Then add the tasks you need to deploy.

Related

Teamcity & Udeploy continuous integration and deployment

I recently set up a continuous integration server in TeamCity and now want to take it to the next step, continuous deployment.
I have added VCS trigger in TeamCity which triggering the build once new code is committed in our deployment branch and it is working fine.
I have also written some script to push the latest build in udeploy component.
What I want to do here is once the new version created and pushed to udeploy, the deployment will start automatically.

Clarification on correct usage of TFS to publish Web Application

I'm trying to setup CI via TFS 2015, I've got a solution that has got 2 main Web application that currently we deploy manually editing the config files and so on (which sometimes leads to errors)
I've read about build/release process and in the past I've used Jenkins as build server. But till today I've got a question and that's related to when apply the transformation of XML config files.
In my current VTFS2015 setup I've created a build process and I build the project with the following line
msbuild /p:Configuration=Test /p:PublishProfile=Test /p:DeployOnBuild=true xxx\xxx.csproj
This creates me in the folder obj\Test\Package\PackageTmp the package
Is this ok? or should this be done in the release management tab? Consider in my farm I've
Test (from DEV trunk)
Staging (from Dev trunk as well)
Production (from production trunk on 3 machines)
My goal is to have them automatically delivered on the machines, but I don't know the right moment to apply the transformation (during the build I can use the publish feature, during the RM I can use a ps1 script)
Thanks in advance
Well, I think this thread will helps: What TFS 2017 build task applies web.config transforms during TFS builds?
To apply the transformations you can use the extension: Apply transformations in vNext build process.
Usually it should be a package and be used in a deploy task such as
Deploy: WinRM - IIS Web App Deployment or Azure App Service
Deployment to achieved the deployment.
1) Can transforms be engaged in both Builds and Releases?
Yes, you could also do this in a build pipeline with the useage of build deploy task. You need to add the task after the publish build
artifacts task.
2) Does TFS 2017 require a lot of special handling to engage a
transform file?
update
The BuildConfiguration variable is different in TFS 2017, it's inside
the MSBuild task! Transforms are now applied according
to the MSBuild task Configuration setting.
Edit the .proj file is a method to do the transform. If you don't need to change the transform, it will auto do it during the build.You
could also use some 3-rd party task/extension for extra transform such
as: XDT Transform
Usually we separate the build and release for the deployment, cause
it's easy to configure multiple environments and easy to debug issue.
You definitely could do this only in build but with a bloated process.
You could refer this tutorial: Build and Deploy Azure Web Apps using
Team Foundation Server/Services vNext Builds.
For a separate build and release solution, you could take a look at
this blog: Using web.config transforms and Release Manager – TFS
2017/Team Services edition

How to revert the build in Teamcity after the CI tests failed

I am using TeamCity for my CI integration and TFS as my code repo. We trigger a build to deploy the code changes on every check-in by devs. Once this build is successful, then we trigger another build configuration which runs some sanity tests which are managed by automation team and not the unit tests. Now when any test in this build fails, I want to revert the check-in made by the dev's implying there was a problem in the application with the latest code and previously successful build to be redeployed.
It sounds like you want to use TC Delayed Commit Feature.
Delayed Commit Overview Page
Delayed Commit Documentation

Disable automatic deployment to NuGet in AppVeyor

I want to accomplish following flow:
All commits are built by AppVeyor and .nupkg is created with version for example 1.2.3-{build}.
When I decide code is stable enough, I want to manually deploy it to NuGet with version 1.2.3 (without build number suffix).
Then I change env variable from 1.2.3 to 1.2.4 and process is repeated.
I have almost complete AppVeyor configuration, but I encountered following problem:
AppVeyor tries to deploy every build to NuGet. I want to be able to manually pick which builds I will promote to stable and push them to NuGet.
How can I make AppVeyor not deploying any build without my action?
You probably need to use Environment instead of Inline deployment. Difference is described here
For your scenario you can simple remove deployment from build and create new NuGet deployment Environment to manually call is against specific build when needed.

Post-Build event not triggered by Octopus & Team City for C# Project

I added a Post-Build scropt to my .csproj. Checked it into TFS. I see Team City builds fine.
But when OctoDeploy pushes that nuget package for that build, I do not see that post-build script copying a folder to the bin of that project which is what the script does. It works fine locally on my PC but just is never triggered if OctoDeploy pushes my build to our dev or stage servers.
Not sure where to start. If you need more info let me know.
If it is a post build script, then you're talking about a script that is run at build time. Octopus doesn't run any part of the build, it deploys the artifacts of the build.
If you are trying to run a post deploy script, check out the docs at http://docs.octopusdeploy.com/display/OD/PowerShell+scripts.

Resources