In this step of ALM demo environment (Virtual Environment for TFS 2013), I am going to explain how to create a Release Build to build the website we have created in “Create a Simple Application and a CI Build”.
First step is to setup a drop location for our Virtual Environment for TFS 2013. For this we will use the build server we created in “Setup a Build Server”.
We have to give permission to TFS Build Service account (we have setup in “Setup a Build Server”), full control for the drop folder, in order to create build outputs
Let’s share this folder for read access for everyone.
Verify access from the development machine.
Now we are going to clone the CI Build which was setup in “Create a Simple Application and a CI Build”.
Let’s rename the build definition.
Change the trigger of this build to manual.
Set the build drop location.
We are going to keep all successful builds (We need to keep these builds outputs and details as long as required and manually archive whenever necessary).
We are now done with the build definition. (We have changed nothing in the process tab. It is as same as the CI build setup in “Create a Simple Application and a CI Build”.)
Let’s queue a release build.
Build starts to run.
Once the build is done, we can see the output in the build drop location.
We can find the site created in “Create a Simple Application and a CI Build”, published in to BuildDrop\_PublishedWebsites.
I will conclude the series Virtual Environment for TFS 2013 with this post. Do not worry, as promised when I started this series of posts, I will continue to explain VS 2013 Release Management as a new series using Virtual Environment for TFS 2013.
Sunday 29 June 2014
Thursday 26 June 2014
10. Create a Simple Application and a CI Build - Setup Virtual Environment for TFS 2013 - Using Virtualbox
Now we are ready with TFS, Build Server and Development machine in our ALM demo environment (Virtual Environment for TFS 2013), and it is good time to create simple application and a CI build for it. If you wonder what is a CI Build and why we need it refer my post “Why CI build”.
Let’s create very simple Asp.Net Web Forms application first. Here I do nothing but use the template to create a simple app.
First a VS Solution.
Next add a ASP.Net Web Forms Application.
Now we have a basic Asp.Net Forms Application up and running.
Let’s check in this to TFS.
Now we have a simple application checked in to TFS.
Our next goal is to set up a CI Build, which builds for each changeset we check in. A new build definition can be created by navigating to Builds from Team Explorer Home, and clicking on New Build Definition.
Build name specified as “DemoWS.CI”.
In the trigger we have to set as Continuous Integration to make the build trigger for every check in.
Source settings we have to specify the correct source mapping.
In the Process tab of build definition we specify solution to build and we are setting build agent tags to correctly locate the build agent.
We are setting at least a build agent with VS2013 available should be located when the build is triggered.
Configuration to build we are selecting in this demo is Release and Any CPU.
We do not want to keep all successful builds in a CI build, since this is just a verification of latest source state of success compilation.
Once we save our build definition is ready.
We can queue a test build by right clicking on the build definition and click on Queue New Build.
Double click on this will open detail view.
Our CI build is done. (Ignore the time taken to build, my build server is having only 512MB RAM and TFS server only 2 GB of RAM, it will be much faster in a virtual/physical environment with more resources :))
Now let’s do a code change and check in to see if a new build triggers. Assume I have a bug to fix :)
So let’s do the fix.
We do the change
Then check in while resolving/closing the task.
Check in has triggered a build and it is done.
We can see our work items (task and Bug) associated correctly to the build.
The task is set to closed automatically.
We can resolve the Bug now.
Next I will explain how to create a release build with a build out put.
Let’s create very simple Asp.Net Web Forms application first. Here I do nothing but use the template to create a simple app.
First a VS Solution.
Next add a ASP.Net Web Forms Application.
Now we have a basic Asp.Net Forms Application up and running.
Let’s check in this to TFS.
Now we have a simple application checked in to TFS.
Our next goal is to set up a CI Build, which builds for each changeset we check in. A new build definition can be created by navigating to Builds from Team Explorer Home, and clicking on New Build Definition.
Build name specified as “DemoWS.CI”.
In the trigger we have to set as Continuous Integration to make the build trigger for every check in.
Source settings we have to specify the correct source mapping.
We do not want to create any output from this CI build. We are just making sure our code is in a valid state and compile without errors.
In the Process tab of build definition we specify solution to build and we are setting build agent tags to correctly locate the build agent.
We are setting at least a build agent with VS2013 available should be located when the build is triggered.
Configuration to build we are selecting in this demo is Release and Any CPU.
We do not want to keep all successful builds in a CI build, since this is just a verification of latest source state of success compilation.
Once we save our build definition is ready.
We can queue a test build by right clicking on the build definition and click on Queue New Build.
Build is just started
Double click on this will open detail view.
Our CI build is done. (Ignore the time taken to build, my build server is having only 512MB RAM and TFS server only 2 GB of RAM, it will be much faster in a virtual/physical environment with more resources :))
Now let’s do a code change and check in to see if a new build triggers. Assume I have a bug to fix :)
So let’s do the fix.
We do the change
Then check in while resolving/closing the task.
Check in has triggered a build and it is done.
We can see our work items (task and Bug) associated correctly to the build.
The task is set to closed automatically.
We can resolve the Bug now.
Next I will explain how to create a release build with a build out put.
Subscribe to:
Posts (Atom)
Popular Posts
-
In Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use t...
-
Adding Azure Container Registry (ACR) service connection to Azure DevOps is really simple as described in " Create Service Connection ...
-
Some times a silly mistake can waste lot of time of a developer. The exception “System.IO.IOException: The response ended prematurely.” whil...
-
We have discueed, that we have to use an environment variable to handle input parameter default values, if we are using trigger for workflo...
-
az aks get-credentials is used to get the kubeconfig updated so that we can access AKS clusters from a terminal (You need to first use az ...